Skip to content

Commit

Permalink
Use Gradle Nexus Publish Plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Feb 26, 2024
1 parent 84ceb83 commit bab1436
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ class SonatypePlugin : Plugin<Project> {
}
}

configure<NexusPublishExtension> {
// use default repository called 'sonatype' and set the corresponding default urls
repositories.sonatype {
nexusUrl.set(URI.create("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(URI.create("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}

disallowPublishTasks()
}
}
Expand Down Expand Up @@ -223,14 +231,6 @@ class SonatypePlugin : Plugin<Project> {
}
}

configure<NexusPublishExtension> {
// use default repository called 'sonatype' and set the corresponding default urls
repositories.sonatype {
nexusUrl.set(URI.create("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(URI.create("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}

configure<SigningExtension> {
sign(the<PublishingExtension>().publications)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ internal class SonatypePluginIT {
.willReturn(okJson("""{"type": "released", "transitioning": false}""")))
}

@Disabled
@Test
fun testMultiModuleProject(@TempDir testProjectDir: Path, @Wiremock wiremock: WireMockServer) {
Files.writeString(testProjectDir.resolve("build.gradle.kts"), """
Expand Down

0 comments on commit bab1436

Please sign in to comment.