Skip to content

Commit

Permalink
Fix publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Vankka committed Jul 3, 2023
1 parent 5de8a21 commit 8ecba3e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
plugins {
id 'java'
id 'maven-publish'
id 'org.cadixdev.licenser' version '0.6.0'
id 'net.kyori.blossom' version '1.2.0'
id 'org.cadixdev.licenser' version '0.6.1'
}

version = '1.3.1'
Expand Down
9 changes: 4 additions & 5 deletions gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-gradle-plugin'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'com.gradle.plugin-publish' version '0.14.0' apply false
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'com.gradle.plugin-publish' version '1.1.0' apply false
}

repositories {
Expand All @@ -28,7 +28,7 @@ shadowJar {

gradlePlugin {
plugins {
runtimeDependencyDownload {
create('runtimeDependencyDownload') {
id = 'dev.vankka.dependencydownload.plugin'
displayName = 'DependencyDownload Plugin'
description = 'A plugin to generate a metadata file for downloading dependencies during runtime'
Expand All @@ -41,10 +41,9 @@ if (!version.endsWith('-SNAPSHOT')) {
apply plugin: 'com.gradle.plugin-publish'

// Doesn't allow snapshot versions, so snapshots are put on sonatype
pluginBundle {
gradlePlugin {
website = '/~https://github.com/Vankka/DependencyDownload'
vcsUrl = '/~https://github.com/Vankka/DependencyDownload'
tags = ['runtime', 'dependency', 'download']
}
return
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
13 changes: 9 additions & 4 deletions runtime/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
apply plugin: 'java-library'
apply plugin: 'net.kyori.blossom'

dependencies {
api project(':common')
implementation 'me.lucko:jar-relocator:1.5'
}

blossom {
replaceToken('@VERSION@', project.version, 'src/main/java/dev/vankka/dependencydownload/repository/Repository.java')
tasks.register('generateSources', Copy) {
from 'src/main/java/dev/vankka/dependencydownload/repository/Repository.java'
into "$buildDir/generated-src"
filter { line -> line.replaceAll('@VERSION@', project.version) }
}

compileJava {
dependsOn generateSources
compileJava.source "$buildDir/generated-src"
}

jar {
dependsOn blossomSourceReplacementJava
manifest {
attributes("Automatic-Module-Name": "dev.vankka.dependencydownload.runtime")
}
Expand Down

0 comments on commit 8ecba3e

Please sign in to comment.