Skip to content

Commit cb51478

Browse files
committed
Updates to AGP alpha, gradle and adds GMD in GHA
1 parent e1cad44 commit cb51478

File tree

5 files changed

+94
-3
lines changed

5 files changed

+94
-3
lines changed

.github/workflows/blueprints.yaml

+67
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,70 @@ jobs:
7777
with:
7878
name: test-reports
7979
path: app/build/reports/
80+
81+
82+
gradleManagedVirtualDevicesTest:
83+
needs: build
84+
runs-on: macos-latest
85+
timeout-minutes: 30
86+
87+
steps:
88+
- name: Checkout
89+
uses: actions/checkout@v2
90+
91+
- name: Copy CI gradle.properties
92+
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
93+
94+
- name: Set up JDK 11
95+
uses: actions/setup-java@v1
96+
with:
97+
java-version: 11
98+
99+
- name: Generate cache key for Gradle cache
100+
run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt
101+
102+
- uses: actions/cache@v2
103+
with:
104+
path: |
105+
~/.gradle/caches/modules-*
106+
~/.gradle/caches/jars-*
107+
~/.gradle/caches/build-cache-*
108+
key: gradle-${{ hashFiles('checksum.txt') }}
109+
110+
- name: Cache pixel2api30 system image
111+
uses: actions/cache@v2
112+
with:
113+
path: |
114+
~/.android/gradle/avd/dev30_aosp-atd_x86_Pixel_2.avd.*
115+
key: pixel2api30
116+
117+
- name: Cache pixel2api27 system image
118+
uses: actions/cache@v2
119+
with:
120+
path: ~/.android/gradle/avd/dev27_aosp_x86_Pixel_2.*
121+
key: pixel2api27
122+
123+
- name: Cache nexus9api29 system image
124+
uses: actions/cache@v2
125+
with:
126+
path: ~/.android/gradle/avd/dev29_aosp_x86_Nexus_9.*
127+
key: nexus9api29
128+
129+
# - name: Run all tests pixel 2 api 27 ATD
130+
# working-directory: ${{ env.SAMPLE_PATH }}
131+
# run: ./gradlew pixel2api27atdMockDebugAndroidTest
132+
#
133+
# - name: Run all tests nexus 9 api 29 ATD
134+
# working-directory: ${{ env.SAMPLE_PATH }}
135+
# run: ./gradlew nexus9api29atdMockDebugAndroidTest
136+
137+
- name: Run all tests pixel 2 api 30 ATD
138+
working-directory: ${{ env.SAMPLE_PATH }}
139+
run: ./gradlew pixel2api30atdMockDebugAndroidTest
140+
141+
- name: Upload test reports
142+
if: always()
143+
uses: actions/upload-artifact@v2
144+
with:
145+
name: test-reports
146+
path: ${{ env.SAMPLE_PATH }}/app/build/reports/androidTests/managedDevice/

app/build.gradle

+25
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,31 @@ android {
102102
composeOptions {
103103
kotlinCompilerExtensionVersion "$composeVersion"
104104
}
105+
106+
testOptions {
107+
devices {
108+
pixel2api30atd(com.android.build.api.dsl.ManagedVirtualDevice) {
109+
// Use device profiles you typically see in Android Studio
110+
device = "Pixel 2"
111+
apiLevel = 30
112+
// You can also specify "google" if you require Google Play Services.
113+
systemImageSource = "aosp-atd"
114+
abi = "x86"
115+
}
116+
pixel2api27atd(com.android.build.api.dsl.ManagedVirtualDevice) {
117+
device = "Pixel 2"
118+
apiLevel = 27
119+
systemImageSource = "aosp-atd"
120+
abi = "x86"
121+
}
122+
nexus9api29atd(com.android.build.api.dsl.ManagedVirtualDevice) {
123+
device = "Nexus 9"
124+
apiLevel = 29
125+
systemImageSource = "aosp-atd"
126+
abi = "x86"
127+
}
128+
}
129+
}
105130
}
106131

107132
/*

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
mavenCentral()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:7.1.2'
10+
classpath 'com.android.tools.build:gradle:7.3.0-alpha07'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
1212
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion"
1313

gradle/wrapper/gradle-wrapper.jar

285 Bytes
Binary file not shown.
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri Feb 18 13:22:47 CET 2022
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
54
zipStoreBase=GRADLE_USER_HOME
65
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)