From 0163e3369314b50c67e0aa514a57fad792c5d94f Mon Sep 17 00:00:00 2001 From: rtm516 Date: Sun, 24 Apr 2022 18:02:02 +0100 Subject: [PATCH] Re-arrange groups and artefacts when publishing (#2899) * Re-arrange groups and artefacts when publishing * Publish core jar --- api/geyser/build.gradle.kts | 7 +++++++ build.gradle.kts | 1 - core/build.gradle.kts | 7 +++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/api/geyser/build.gradle.kts b/api/geyser/build.gradle.kts index f9f8e66a8..cfd87cbee 100644 --- a/api/geyser/build.gradle.kts +++ b/api/geyser/build.gradle.kts @@ -1,3 +1,10 @@ dependencies { api(projects.api) +} + +publishing { + publications.named("mavenJava") { + groupId = rootProject.group as String + ".geyser" + artifactId = "api" + } } \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index b10d7c357..bf6c1df4d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -36,7 +36,6 @@ subprojects { val relativePath = projectDir.relativeTo(rootProject.projectDir).path if (relativePath.contains("api")) { - group = rootProject.group as String + ".api" plugins.apply("geyser.api-conventions") } else { group = rootProject.group as String + ".geyser" diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 03260fc8f..c22df20ba 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -77,6 +77,13 @@ dependencies { annotationProcessor(projects.ap) } +publishing { + publications.named("mavenJava") { + artifact(tasks["jar"]) + artifact(tasks["sourcesJar"]) + } +} + configure { val indra = the()