From d67d5b64da7ee729059d86a0dc5b4c474e1cc997 Mon Sep 17 00:00:00 2001 From: Harvels X Date: Mon, 31 Jan 2022 16:01:32 +0300 Subject: [PATCH] Edit: remove use shadowing for apis; --- api/build.gradle | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/api/build.gradle b/api/build.gradle index 28055395..f0a5b967 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -1,3 +1,8 @@ +plugins { + id 'java-library' + id 'maven-publish' +} + dependencies { implementation project(':common') @@ -5,28 +10,26 @@ dependencies { compileOnly 'org.jetbrains:annotations:22.0.0' } -publishing { - publications { - mavenJava(MavenPublication) { - shadow.component(it) - afterEvaluate { +repositories { + mavenCentral() + maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' } +} + +afterEvaluate { + publishing { + publications { + maven(MavenPublication) { + groupId = "${rootProject.group}.${rootProject.name.toLowerCase()}" + artifactId = project.name + + from components.java artifact javadocsJar } } + repositories { + mavenLocal() + } } - repositories { - mavenLocal() - } -} - -shadowJar { - classifier = null - relocate ':common', 'me.william278.husksync' -} - -repositories { - mavenCentral() - maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' } } task javadocs(type: Javadoc) { @@ -39,6 +42,6 @@ task javadocs(type: Javadoc) { } task javadocsJar(type: Jar, dependsOn: javadocs) { - classifier = 'javadoc' + archiveClassifier.set 'javadoc' from javadocs.destinationDir } \ No newline at end of file