Skip to content

Commit

Permalink
chore(ci): Bump AGP matrix (#839)
Browse files Browse the repository at this point in the history
* Bump AGP matrix

* Remove workaround for ProjectBuilder

* Introduce groovy version to the matrix

* Env variable

* Run pluginUnderTestMetadata task before integrationTests

* Use java 17

* Comment
  • Loading branch information
romtsn authored Feb 26, 2025
1 parent 2c84616 commit 511a02b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/test-matrix-agp-gradle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,45 @@ jobs:
agp: [ "7.0.4" ]
gradle: [ "7.2" ]
java: [ "11" ]
groovy: [ "1.2" ]
include:
- agp: "7.2.1"
gradle: "7.4"
java: "11"
groovy: "1.2"
- agp: "7.3.0"
gradle: "7.5"
java: "11"
groovy: "1.2"
- agp: "7.4.0"
gradle: "7.6"
java: "11"
groovy: "1.2"
- agp: "8.0.0"
gradle: "8.0.2"
java: "17"
- agp: "8.1.2"
gradle: "8.1"
groovy: "1.2"
- agp: "8.6.1"
gradle: "8.7"
java: "17"
- agp: "8.2.2"
gradle: "8.2"
groovy: "1.2"
- agp: "8.8.1"
gradle: "8.11.1"
java: "17"
- agp: "8.3.0"
gradle: "8.4"
groovy: "1.7.1"
- agp: "8.9.0-rc02"
gradle: "8.11.1"
java: "17"
- agp: "8.4.0-alpha11"
gradle: "8.6"
groovy: "1.7.1"
- agp: "8.10.0-alpha05"
gradle: "8.11.1"
java: "17"
groovy: "1.7.1"

name: Test Matrix - AGP ${{ matrix.agp }} - Gradle ${{ matrix.gradle }}
env:
VERSION_AGP: ${{ matrix.agp }}
VERSION_GROOVY: ${{ matrix.groovy }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

steps:
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ object BuildPluginsVersion {
// build/publications/maven
const val MAVEN_PUBLISH = "0.17.0"
const val PROGUARD = "7.1.0"
const val GROOVY_REDISTRIBUTED = "1.2"
val GROOVY_REDISTRIBUTED = System.getenv("VERSION_GROOVY") ?: "1.2"
const val BUILDCONFIG = "3.1.0"

const val SPRING_BOOT = "2.7.4"
Expand Down
15 changes: 6 additions & 9 deletions plugin-build/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import io.sentry.android.gradle.internal.ASMifyTask
import io.sentry.android.gradle.internal.BootstrapAndroidSdk
import java.io.FileInputStream
import java.util.Properties
import org.gradle.api.internal.classpath.ModuleRegistry
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.gradle.configurationcache.extensions.serviceOf
import org.jetbrains.kotlin.config.KotlinCompilerVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

Expand Down Expand Up @@ -101,13 +99,6 @@ dependencies {
// Needed to read contents from APK/Source Bundles
testImplementation(Libs.ARSC_LIB)
testImplementation(Libs.ZIP4J)

testRuntimeOnly(
files(
serviceOf<ModuleRegistry>().getModule("gradle-tooling-api-builders")
.classpath.asFiles.first()
)
)
}

configure<JavaPluginExtension> {
Expand Down Expand Up @@ -165,6 +156,11 @@ tasks.named("test").configure {
tasks.register<Test>("integrationTest").configure {
group = "verification"
description = "Runs the integration tests"
// for some reason Gradle > 8.10 doesn't pick up the pluginUnderTestMetadata classpath, so we
// need to add it manually
classpath += layout.files(
project.layout.buildDirectory.get().toString() + "/pluginUnderTestMetadata"
)

maxParallelForks = Runtime.getRuntime().availableProcessors() / 2

Expand All @@ -184,6 +180,7 @@ tasks.register<Test>("integrationTest").configure {
filter {
includeTestsMatching("io.sentry.android.gradle.integration.*")
}
dependsOn(tasks.withType<PluginUnderTestMetadata>())
}

gradlePlugin {
Expand Down

0 comments on commit 511a02b

Please sign in to comment.