fix: Don't publish root directory to maven repository (#3676)

* fix: Don't publish root directory (Fixes #3647)

* fix: More investigations

* fix: Exclude task 'jar' from root project

* chore: Keep group ID in the root scope
This commit is contained in:
Alexander Brandes 2022-06-13 15:23:12 +02:00 committed by GitHub
parent d69f3b0893
commit bb0aa8d5cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,10 +18,11 @@ plugins {
idea idea
} }
group = "com.plotsquared"
version = "6.9.1-SNAPSHOT" version = "6.9.1-SNAPSHOT"
allprojects { subprojects {
group = "com.plotsquared" group = rootProject.group
version = rootProject.version version = rootProject.version
repositories { repositories {
@ -50,9 +51,7 @@ allprojects {
url = uri("https://maven.enginehub.org/repo/") url = uri("https://maven.enginehub.org/repo/")
} }
} }
}
subprojects {
apply { apply {
plugin<JavaPlugin>() plugin<JavaPlugin>()
plugin<JavaLibraryPlugin>() plugin<JavaLibraryPlugin>()
@ -68,9 +67,7 @@ subprojects {
dependencies { dependencies {
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.5")) implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.5"))
} }
}
allprojects {
dependencies { dependencies {
// Tests // Tests
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2") testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
@ -188,7 +185,6 @@ allprojects {
shadowJar { shadowJar {
this.archiveClassifier.set(null as String?) this.archiveClassifier.set(null as String?)
this.archiveFileName.set("${project.name}-${project.version}.${this.archiveExtension.getOrElse("jar")}") this.archiveFileName.set("${project.name}-${project.version}.${this.archiveExtension.getOrElse("jar")}")
this.destinationDirectory.set(rootProject.tasks.shadowJar.get().destinationDirectory.get())
} }
named("build") { named("build") {
@ -198,7 +194,6 @@ allprojects {
useJUnitPlatform() useJUnitPlatform()
} }
} }
} }
nexusPublishing { nexusPublishing {
@ -209,3 +204,7 @@ nexusPublishing {
} }
} }
} }
tasks.getByName<Jar>("jar") {
enabled = false
}