From adcdcbb397891aebf1454cc80d628b7a38a08bf1 Mon Sep 17 00:00:00 2001 From: Slqmy <90862990+Slqmy@users.noreply.github.com> Date: Wed, 7 Aug 2024 13:48:07 +0100 Subject: [PATCH 1/3] Use `from(components["java"])` instead of classifiers --- build.gradle.kts | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index aea687ba..2f928212 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -102,24 +102,11 @@ bukkitPluginYaml { publishing { publications { create("mavenJava") { + from(components["java"]) + groupId = projectGroupString artifactId = projectNameString version = projectVersionString - - fun artifactPath(classifier: String): String { - return buildDirectoryString + "/libs/" + projectNameString + "-" + projectVersionString + "-" + classifier + ".jar" - } - - val devAllClassifier = "dev-all" - val devClassifier = "dev" - - artifact(artifactPath(devAllClassifier)) { - classifier = devAllClassifier - } - - artifact(artifactPath(devClassifier)) { - classifier = devClassifier - } } } } From 32dcbff8ff4e8d318389ceb3358e5146a0952bee Mon Sep 17 00:00:00 2001 From: Slqmy <90862990+Slqmy@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:06:08 +0100 Subject: [PATCH 2/3] Configure `shadowJar` to use different archive file name This should allow projects that depend on this project to use it as a dependency with Jitpack. --- build.gradle.kts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 2f928212..3579df12 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -81,6 +81,10 @@ tasks { dependsOn(shadowJar) } + shadowJar { + archiveFileName = projectNameString + "-" + projectVersionString + "." + "jar" + } + compileJava { options.release = javaVersion } From 4e1cf7b9593d3147f1333dabf02dc77548ea8745 Mon Sep 17 00:00:00 2001 From: Slqmy <90862990+Slqmy@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:06:36 +0100 Subject: [PATCH 3/3] Bump version --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 3579df12..e901c6ea 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -48,7 +48,7 @@ val topLevelDomain = "net" val projectNameString = rootProject.name group = topLevelDomain + groupStringSeparator + mainProjectAuthor.lowercase() + groupStringSeparator + snakecase(projectNameString) -version = "0.0.1" +version = "0.0.3" val buildDirectoryString = buildDir.toString()