Skip to content

Commit e31b834

Browse files
authored
chore(ci): Unify release build command and artifact upload (#1170)
* chore(ci): Unify release build command and artifact upload * spotless
1 parent f2f447b commit e31b834

4 files changed

Lines changed: 11 additions & 10 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,14 @@ jobs:
2929
java-version: '17'
3030

3131
- name: Build Gradle Plugin, Kotlin Compiler Plugin, and Snapshots Runtime distribution artifacts
32-
run: ./gradlew :plugin-build:assemble :sentry-kotlin-compiler-plugin:assemble :sentry-snapshots-runtime:assemble
32+
run: ./gradlew assemble
3333

3434
- name: Archive artifacts
3535
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
3636
with:
3737
name: ${{ github.sha }}
3838
path: |
39-
${{ github.workspace }}/plugin-build/build/distributions/*.zip
40-
${{ github.workspace }}/sentry-kotlin-compiler-plugin/build/distributions/*.zip
41-
${{ github.workspace }}/sentry-snapshots-runtime/build/distributions/*.zip
39+
./*/build/distributions/*.zip
4240
4341
- name: Verify artifact contents
4442
shell: bash

build.gradle.kts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ allprojects {
3939

4040
tasks.withType<Delete>().configureEach {
4141
delete(rootProject.buildDir)
42-
dependsOn(gradle.includedBuild("plugin-build").task(":clean"))
43-
dependsOn(gradle.includedBuild("sentry-kotlin-compiler-plugin").task(":clean"))
42+
gradle.includedBuilds.forEach { dependsOn(it.task(":clean")) }
4443
}
4544

4645
tasks.register("integrationTest") {
@@ -75,11 +74,11 @@ tasks.register("preMerge") {
7574
}
7675

7776
tasks.named("spotlessCheck") {
78-
dependsOn(gradle.includedBuild("sentry-kotlin-compiler-plugin").task(":spotlessCheck"))
79-
dependsOn(gradle.includedBuild("plugin-build").task(":spotlessCheck"))
77+
gradle.includedBuilds.forEach { dependsOn(it.task(":spotlessCheck")) }
8078
}
8179

8280
tasks.named("spotlessApply") {
83-
dependsOn(gradle.includedBuild("sentry-kotlin-compiler-plugin").task(":spotlessApply"))
84-
dependsOn(gradle.includedBuild("plugin-build").task(":spotlessApply"))
81+
gradle.includedBuilds.forEach { dependsOn(it.task(":spotlessApply")) }
8582
}
83+
84+
tasks.named("assemble") { gradle.includedBuilds.forEach { dependsOn(it.task(":assemble")) } }

sentry-kotlin-compiler-plugin/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ tasks.named("distZip") {
4141
onlyIf { inputs.sourceFiles.isEmpty.not().also { require(it) { "No distribution to zip." } } }
4242
}
4343

44+
tasks.named("distTar") { enabled = false }
45+
4446
dependencies {
4547
compileOnly(libs.kotlinCompilerEmbeddable)
4648

sentry-snapshots-runtime/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ tasks.named("distZip") {
3232
onlyIf { inputs.sourceFiles.isEmpty.not().also { require(it) { "No distribution to zip." } } }
3333
}
3434

35+
tasks.named("distTar") { enabled = false }
36+
3537
dependencies { compileOnly(libs.androidxAnnotation) }
3638

3739
plugins.withId("com.vanniktech.maven.publish.base") {

0 commit comments

Comments
 (0)