File tree Expand file tree Collapse file tree 5 files changed +26
-20
lines changed
common-plugins/src/main/kotlin/plugins Expand file tree Collapse file tree 5 files changed +26
-20
lines changed Original file line number Diff line number Diff line change 9090 - name : 🏗️ Gradle Build & Run
9191 id : gradle-build
9292 run : |
93- ./gradlew ciBuild
93+ ./gradlew buildAndPublish
9494 echo "dist_path=$(ls -1 backend/build/distributions/*.zip | head -n 1)" >> "$GITHUB_OUTPUT"
9595 echo "dist_name=$(ls -1 backend/build/distributions/*.zip | head -n 1 | xargs basename)" >> "$GITHUB_OUTPUT"
9696 env :
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ $ sdk u java 22.ea-open
2525### Build & Run
2626
2727``` bash
28- $ ./gradlew ciBuild
28+ $ ./gradlew buildAndPublish
2929```
3030
3131<details >
@@ -46,6 +46,10 @@ $ ./gradlew :benchmarks:benchmark
4646$ ./gradlew :backend:listResolvedArtifacts
4747$ ./gradlew createModuleGraph
4848
49+ # Misc
50+ $ ./gradlew checkBuildLogicBestPractices
51+ $ ./gradlew cleanAll
52+
4953# GitHub Actions lint
5054$ actionlint
5155```
Original file line number Diff line number Diff line change 11plugins { alias(libs.plugins.benmanes) }
22
3- tasks.dependencyUpdates { checkConstraints = true }
3+ tasks {
4+ dependencyUpdates { checkConstraints = true }
5+
6+ register(" clean" ) {
7+ group = " build"
8+ description = " Cleans all projects"
9+ subprojects.mapNotNull { it.tasks.findByName(" clean" ) }.forEach { dependsOn(it) }
10+ doLast { delete(layout.buildDirectory) }
11+ }
12+ }
Original file line number Diff line number Diff line change @@ -153,23 +153,15 @@ tasks {
153153 // Set GitHub workflow action output for this build
154154 build { finalizedBy(githubActionOutput) }
155155
156- register(" ciBuild" ) {
157- description = " Build with all the reports!"
158- val publish = GithubAction .isTagBuild && Platform .isLinux
159- val ciBuildTasks = buildList {
160- add(tasks.build)
161- add(" :web:build" )
162- add(" :backend:build" )
163- add(" koverHtmlReport" )
164- add(" dokkaHtmlMultiModule" )
165- if (publish) {
166- logger.lifecycle(" Publishing task is enabled for this build!" )
167- finalizedBy(" publishAllPublicationsToGitHubPackagesRepository" )
168- }
156+ val buildAndPublish by registering {
157+ dependsOn(subprojects.map { it.tasks.build })
158+ dependsOn(" :dokkaHtmlMultiModule" , " :koverHtmlReport" )
159+
160+ val publish = Platform .isLinux
161+ if (publish) {
162+ logger.lifecycle(" Publishing task is enabled for this build!" )
163+ subprojects.mapNotNull { it.tasks.findByName(" publish" ) }.forEach { dependsOn(it) }
169164 }
170- dependsOn(* ciBuildTasks.toTypedArray())
171- named(" koverHtmlReport" ).map { it.mustRunAfter(tasks.build) }
172- named(" dokkaHtmlMultiModule" ).map { it.mustRunAfter(tasks.build) }
173165 }
174166
175167 // Task to print the project version
Original file line number Diff line number Diff line change @@ -91,7 +91,8 @@ tasks {
9191 register(" cleanAll" ) {
9292 description = " Clean all composite builds"
9393 group = LifecycleBasePlugin .CLEAN_TASK_NAME
94- gradle.includedBuilds.forEach { dependsOn(it.task(" :clean" )) }
94+ dependsOn(gradle.includedBuilds.map { it.task(" :clean" ) })
95+ dependsOn(subprojects.map { it.tasks.clean })
9596 }
9697
9798 wrapper {
You can’t perform that action at this time.
0 commit comments