diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8682592..4be24aea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -217,11 +217,6 @@ jobs: needs.filter.outputs.ci == 'true' ) && (needs.build-lint.result == 'success' || needs.build-lint.result == 'skipped') - strategy: - matrix: - include: - - version: '58' - - version: '57' steps: - name: Checkout diff --git a/apps/AndroidApp/e2e/jest.config.expo56.cjs b/apps/AndroidApp/e2e/jest.config.expo58.cjs similarity index 100% rename from apps/AndroidApp/e2e/jest.config.expo56.cjs rename to apps/AndroidApp/e2e/jest.config.expo58.cjs diff --git a/gradle-plugins/react/brownfield/build.gradle.kts b/gradle-plugins/react/brownfield/build.gradle.kts index b73354d7..032bb973 100644 --- a/gradle-plugins/react/brownfield/build.gradle.kts +++ b/gradle-plugins/react/brownfield/build.gradle.kts @@ -103,14 +103,28 @@ repositories { google() } +// AGP for GradleRunner.withPluginClasspath(), which only sees runtime dependencies, so TestKit +// projects can still apply com.android.library +val testKitPluginClasspath: Configuration by configurations.creating + dependencies { - implementation(libs.agp) - implementation(libs.common) + // AGP is provided by the consuming app's build. Declaring it as `implementation` puts it on the + // app's buildscript classpath, where it wins version resolution and forces this AGP (and its minimum + // Gradle version) onto the app + compileOnly(libs.agp) + compileOnly(libs.common) implementation(libs.asm.commons) implementation(libs.versioncompare) + testImplementation(libs.agp) + testImplementation(libs.common) testImplementation(libs.junit.jupiter) testImplementation(gradleTestKit()) testImplementation(kotlin("test")) + testKitPluginClasspath(libs.agp) +} + +tasks.pluginUnderTestMetadata { + pluginClasspath.from(testKitPluginClasspath) } tasks.test { diff --git a/gradle-plugins/react/brownfield/gradle/libs.versions.toml b/gradle-plugins/react/brownfield/gradle/libs.versions.toml index 6ce14827..e117de2d 100644 --- a/gradle-plugins/react/brownfield/gradle/libs.versions.toml +++ b/gradle-plugins/react/brownfield/gradle/libs.versions.toml @@ -2,8 +2,10 @@ kotlinJvm = "2.2.21" ktlint = "12.1.1" detekt = "1.23.7" -agp = "9.2.1" -common = "32.2.0" +# Compile against the oldest supported AGP: AGP is compileOnly, so the app provides it at runtime, +# and a plugin built against AGP 9 fails on AGP 8 apps (e.g. Expo 57) with NoClassDefFoundError +agp = "8.5.2" +common = "31.2.2" # do not bump it for now, as it throws an error for incompatible AGP used asm-commons = "9.7" versioncompare = "1.5.0" junit = "5.11.4"