diff --git a/build.gradle b/build.gradle index 28d17fc..ac61cd1 100644 --- a/build.gradle +++ b/build.gradle @@ -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' diff --git a/gradle-plugin/build.gradle b/gradle-plugin/build.gradle index 3c862b1..da2ee84 100644 --- a/gradle-plugin/build.gradle +++ b/gradle-plugin/build.gradle @@ -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 { @@ -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' @@ -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 } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37aef8d..8612e3f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/runtime/build.gradle b/runtime/build.gradle index 4a53035..3fbe6d5 100644 --- a/runtime/build.gradle +++ b/runtime/build.gradle @@ -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") }