Skip to content

Commit

Permalink
Fix gradle publishing (#1043)
Browse files Browse the repository at this point in the history
* add new top-level publishAllModules and publishAllModulesToMavenLocal tasks that depend on the publish and publishtoMavenLocal tasks in all sub modules

* update github workflow to use new compound publishAllModules task

Co-authored-by: Konrad Weiss <[email protected]>
  • Loading branch information
maximilian-galanis and konradweiss authored Jan 17, 2023
1 parent 0db4fc4 commit 64f3c70
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'beta') && !contains(github.ref, 'alpha')
run: |
export ORG_GRADLE_PROJECT_signingKey=`echo ${{ secrets.GPG_PRIVATE_KEY }} | base64 -d`
./gradlew --no-daemon -Dorg.gradle.internal.publish.checksums.insecure=true --parallel -Pversion=$VERSION -PenableGoFrontend=true -PenablePythonFrontend=true -PenableLLVMFrontend=true -PenableTypeScriptFrontend=true signMavenPublication build publish dokkaHtmlMultiModule
./gradlew --no-daemon -Dorg.gradle.internal.publish.checksums.insecure=true --parallel -Pversion=$VERSION -PenableGoFrontend=true -PenablePythonFrontend=true -PenableLLVMFrontend=true -PenableTypeScriptFrontend=true publishAllModules dokkaHtmlMultiModule
env:
VERSION: ${{ steps.determine_version.outputs.version }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSWORD }}
Expand Down
13 changes: 13 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@ sonarqube {
}
}

val publishAllModules by tasks.registering() {
subprojects.forEach {
dependsOn(it.tasks.named("publish"))
}
}

val publishAllModulesToMavenLocal by tasks.registering() {
subprojects.forEach {
dependsOn(it.tasks.named("publishToMavenLocal"))
}
}


//
// Load the properties that define which frontends to include
//
Expand Down

0 comments on commit 64f3c70

Please sign in to comment.