Skip to content

Commit 6132615

Browse files
authored
[build] apply nexus-publish plugin on ALL projects (#567)
It appears that maven-publish plugin will skip its execution if repositories are not configured in given project. Changing the configuration to apply nexus-publish plugin on all projects.
1 parent afd4697 commit 6132615

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

build.gradle.kts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ allprojects {
3434
jcenter()
3535
mavenCentral()
3636
}
37+
38+
apply(plugin = "de.marcphilipp.nexus-publish")
39+
40+
configure<NexusPublishExtension> {
41+
repositories {
42+
sonatype {
43+
username.set(System.getenv("SONATYPE_USERNAME"))
44+
password.set(System.getenv("SONATYPE_PASSWORD"))
45+
}
46+
}
47+
}
3748
}
3849

3950
subprojects {
@@ -54,7 +65,6 @@ subprojects {
5465
apply(plugin = "java-library")
5566
apply(plugin = "org.jetbrains.dokka")
5667
apply(plugin = "maven-publish")
57-
apply(plugin = "de.marcphilipp.nexus-publish")
5868
apply(plugin = "signing")
5969

6070
tasks.withType<KotlinCompile> {
@@ -170,15 +180,6 @@ subprojects {
170180
}
171181
}
172182

173-
configure<NexusPublishExtension> {
174-
repositories {
175-
sonatype {
176-
username.set(System.getenv("SONATYPE_USERNAME"))
177-
password.set(System.getenv("SONATYPE_PASSWORD"))
178-
}
179-
}
180-
}
181-
182183
tasks {
183184
jar {
184185
enabled = false

0 commit comments

Comments
 (0)