From 077f57d85cf1a8f808473d2c78b385cbdcfa1f6d Mon Sep 17 00:00:00 2001 From: Len <40720638+destro174@users.noreply.github.com> Date: Sun, 26 May 2024 00:01:26 +0200 Subject: [PATCH] Fix some issues when publishing api --- api/build.gradle.kts | 9 +-------- build.gradle.kts | 32 +++++++++++++------------------- 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/api/build.gradle.kts b/api/build.gradle.kts index 14e5b19..2820caa 100644 --- a/api/build.gradle.kts +++ b/api/build.gradle.kts @@ -16,14 +16,7 @@ publishing { publications { create("mavenJava") { from(components["java"]) - } - } - - repositories{ - maven { - name = "maven" - url = uri("https://repo.destro.xyz/snapshots") - credentials(PasswordCredentials::class) + artifactId = "${rootProject.name}-${project.name}-$version.jar" } } } \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index b2139ef..2b4aa2a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,6 +23,18 @@ subprojects { languageVersion.set(JavaLanguageVersion.of(17)) } } + + publishing { + configure { + repositories { + maven { + name = "maven" + url = uri("https://repo.destro.xyz/snapshots/") + credentials(PasswordCredentials::class) + } + } + } + } } dependencies { @@ -51,29 +63,11 @@ tasks { } jar { - enabled = false +// enabled = false // archiveFileName.set("${rootProject.name}.jar") } } -publishing { - publications { - create("mavenJava") { - from(components["java"]) - } - } - - configure { - repositories { - maven { - name = "maven" - url = uri("https://repo.destro.xyz/snapshots/") - credentials(PasswordCredentials::class) - } - } - } -} - dependencies { compileOnly("com.alttd:Comet-API:1.20.4-R0.1-SNAPSHOT") }