From c4e19250e19c1a621dea965f9bcf56dcaef3f346 Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Mon, 1 May 2023 16:45:39 -0400 Subject: [PATCH] [CP] Integration tests support AGP 8.0 (#125686) - Smallest change required to support host apps using agp 8.0 (#125657) Original issue https://github.com/flutter/flutter/issues/125181 Cherry pick issue https://github.com/flutter/flutter/issues/125688 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. --- packages/integration_test/android/build.gradle | 4 ++++ packages/integration_test/example/android/app/build.gradle | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/packages/integration_test/android/build.gradle b/packages/integration_test/android/build.gradle index f617e122966..5d493690d19 100644 --- a/packages/integration_test/android/build.gradle +++ b/packages/integration_test/android/build.gradle @@ -26,6 +26,10 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { + // Conditional for compatibility with AGP <4.2. + if (project.android.hasProperty("namespace")) { + namespace 'dev.flutter.integration_test' + } compileSdkVersion 31 compileOptions { diff --git a/packages/integration_test/example/android/app/build.gradle b/packages/integration_test/example/android/app/build.gradle index bc4a84f721a..6f9dc2be9cd 100644 --- a/packages/integration_test/example/android/app/build.gradle +++ b/packages/integration_test/example/android/app/build.gradle @@ -29,6 +29,10 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { + // Conditional for compatibility with AGP <4.2. + if (project.android.hasProperty("namespace")) { + namespace 'com.example.integration_test_example' + } compileSdkVersion flutter.compileSdkVersion compileOptions {