@@ -48,6 +48,24 @@ allprojects {
4848 toolchain. languageVersion. set(JavaLanguageVersion . of(javaTarget))
4949 }
5050 }
51+
52+ publishing {
53+ publications {
54+ mavenJava(MavenPublication ) {
55+ artifactId = rootProject. archives_base_name + " -" + project. name
56+ from components. java
57+ }
58+ }
59+
60+ // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
61+ repositories {
62+ // Add repositories to publish to here.
63+ // Notice: This block does NOT have the same function as the block in the top level.
64+ // The repositories here will be used for publishing your artifact, not for
65+ // retrieving dependencies.
66+ mavenLocal()
67+ }
68+ }
5169}
5270
5371subprojects {
@@ -103,24 +121,6 @@ subprojects {
103121 tasks. withType(JavaCompile ) {
104122 source(project(" :common" ). sourceSets. main. allSource)
105123 }
106-
107- publishing {
108- publications {
109- mavenJava(MavenPublication ) {
110- artifactId = rootProject. archives_base_name + " -" + project. name
111- from components. java
112- }
113- }
114-
115- // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
116- repositories {
117- // Add repositories to publish to here.
118- // Notice: This block does NOT have the same function as the block in the top level.
119- // The repositories here will be used for publishing your artifact, not for
120- // retrieving dependencies.
121- mavenLocal()
122- }
123- }
124124 }
125125
126126 tasks. withType(dokkaHtmlPartial. getClass()). configureEach {
@@ -129,13 +129,6 @@ subprojects {
129129 )
130130 }
131131
132- /* java {
133- // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
134- // if it is present.
135- // If you remove this line, sources will not be generated.
136- withSourcesJar()
137- }*/
138-
139132 jar {
140133 from(" LICENSE" ) {
141134 rename { " ${ it} _${ project.archivesBaseName} " }
0 commit comments