diff --git a/build.gradle b/build.gradle index 49aac8e46..36bf0d6b4 100644 --- a/build.gradle +++ b/build.gradle @@ -48,6 +48,24 @@ allprojects { toolchain.languageVersion.set(JavaLanguageVersion.of(javaTarget)) } } + + publishing { + publications { + mavenJava(MavenPublication) { + artifactId = rootProject.archives_base_name + "-" + project.name + from components.java + } + } + + // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. + repositories { + // Add repositories to publish to here. + // Notice: This block does NOT have the same function as the block in the top level. + // The repositories here will be used for publishing your artifact, not for + // retrieving dependencies. + mavenLocal() + } + } } subprojects { @@ -103,24 +121,6 @@ subprojects { tasks.withType(JavaCompile) { source(project(":common").sourceSets.main.allSource) } - - publishing { - publications { - mavenJava(MavenPublication) { - artifactId = rootProject.archives_base_name + "-" + project.name - from components.java - } - } - - // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. - repositories { - // Add repositories to publish to here. - // Notice: This block does NOT have the same function as the block in the top level. - // The repositories here will be used for publishing your artifact, not for - // retrieving dependencies. - mavenLocal() - } - } } tasks.withType(dokkaHtmlPartial.getClass()).configureEach { @@ -129,13 +129,6 @@ subprojects { ) } - /*java { - // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task - // if it is present. - // If you remove this line, sources will not be generated. - withSourcesJar() - }*/ - jar { from("LICENSE") { rename { "${it}_${project.archivesBaseName}" }