From 6146dd55769bcd67e8365190510a0babee67a04b Mon Sep 17 00:00:00 2001 From: Alex Vanyo Date: Fri, 3 Feb 2023 15:38:48 -0800 Subject: [PATCH] Switch GMD to use a convention plugin Change-Id: Ia4f94cd7533c9168752ee39e3f960108fe802ab4 --- .github/workflows/AndroidCIWithGmd.yaml | 5 +- .run/Generate Demo Baseline Profile.run.xml | 2 +- benchmarks/build.gradle.kts | 13 ---- .../AndroidApplicationConventionPlugin.kt | 2 + .../kotlin/AndroidFeatureConventionPlugin.kt | 3 + .../kotlin/AndroidLibraryConventionPlugin.kt | 2 + .../kotlin/AndroidTestConventionPlugin.kt | 2 + .../apps/nowinandroid/GradleManagedDevices.kt | 62 +++++++++++++++++++ feature/bookmarks/build.gradle.kts | 14 ----- feature/foryou/build.gradle.kts | 14 ----- feature/interests/build.gradle.kts | 14 ----- feature/settings/build.gradle.kts | 14 ----- feature/topic/build.gradle.kts | 14 ----- 13 files changed, 76 insertions(+), 85 deletions(-) create mode 100644 build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/GradleManagedDevices.kt diff --git a/.github/workflows/AndroidCIWithGmd.yaml b/.github/workflows/AndroidCIWithGmd.yaml index 6721d3aa0..eb890c4d5 100644 --- a/.github/workflows/AndroidCIWithGmd.yaml +++ b/.github/workflows/AndroidCIWithGmd.yaml @@ -10,6 +10,9 @@ jobs: android-ci: runs-on: macos-12 + strategy: + matrix: + device-config: [ "pixel4api30aospatd" ] steps: - uses: actions/setup-java@v3 @@ -23,7 +26,7 @@ jobs: - name: Run instrumented tests with GMD run: ./gradlew cleanManagedDevices --unused-only && - ./gradlew pixel4api30DemoDebugAndroidTest -Dorg.gradle.workers.max=1 + ./gradlew ${{ matrix.device-config }}DemoDebugAndroidTest -Dorg.gradle.workers.max=1 -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true --info - name: Upload test reports diff --git a/.run/Generate Demo Baseline Profile.run.xml b/.run/Generate Demo Baseline Profile.run.xml index 4c34e5a76..a4b0de892 100644 --- a/.run/Generate Demo Baseline Profile.run.xml +++ b/.run/Generate Demo Baseline Profile.run.xml @@ -34,7 +34,7 @@