Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix task order when releasing to Nexus #33

Merged
merged 12 commits into from
Feb 14, 2024
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build-and-publish:
name: Java Gradle Docker
name: Java Gradle
uses: bakdata/ci-templates/.github/workflows/[email protected]
secrets:
sonar-token: ${{ secrets.SONARCLOUD_TOKEN }}
Expand Down
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,7 @@ if (!version.toString().endsWith("-SNAPSHOT")) {

val sonarqube by tasks
sonarqube.enabled = false //FIXME requires Java 17

tasks.named("closeRepository") {
mustRunAfter("publishToNexus")
}
6 changes: 6 additions & 0 deletions sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ class SonatypePlugin : Plugin<Project> {
addParentPublishToNexusTasks()

disallowPublishTasks()

afterEvaluate {
tasks.named("closeRepository") {
mustRunAfter("publishToNexus")
}
}
}
}

Expand Down
Loading