Skip to content

Commit 0699efc

Browse files
authored
Merge branch 'main' into issue-945
2 parents faf42aa + a5c030f commit 0699efc

File tree

176 files changed

+2503
-1122
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+2503
-1122
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
[*.{kt,kts}]
55
ij_kotlin_allow_trailing_comma=true
66
ij_kotlin_allow_trailing_comma_on_call_site=true
7+
ktlint_function_naming_ignore_when_annotated_with=Composable, Test

.github/PULL_REQUEST_TEMPLATE/pull_request_template.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/ci-gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ org.gradle.parallel=true
1919
org.gradle.workers.max=2
2020

2121
kotlin.incremental=false
22-
kotlin.compiler.execution.strategy=in-process
2322

2423
# Controls KotlinOptions.allWarningsAsErrors.
2524
# This value used in CI and is currently set to false.

.github/dependabot.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
- package-ecosystem: "gradle"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
registries: "*"
13+
labels: [ "version update" ]
14+
groups:
15+
kotlin-ksp-compose:
16+
patterns:
17+
- "org.jetbrains.kotlin:*"
18+
- "org.jetbrains.kotlin.jvm"
19+
- "com.google.devtools.ksp"
20+
- "androidx.compose.compiler:compiler"
21+
open-pull-requests-limit: 10
22+
registries:
23+
maven-google:
24+
type: "maven-repository"
25+
url: "https://maven.google.com"
26+
replaces-base: true

.github/pull_request_template.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Thanks for submitting a pull request. Please include the following information.
2+
3+
**What I have done and why**
4+
Include a summary of what your pull request contains, and why you have made these changes.
5+
6+
Fixes #<issue_number_goes_here>
7+
8+
**Do tests pass?**
9+
- [ ] Run local tests on `DemoDebug` variant: `./gradlew testDemoDebug`
10+
- [ ] Check formatting: `./gradlew --init-script gradle/init.gradle.kts spotlessApply`
11+
12+
**Is this your first pull request?**
13+
- [ ] [Sign the CLA](https://cla.developers.google.com/)
14+
- [ ] Run `./tools/setup.sh`
15+
- [ ] Import the code formatting style as explained in [the setup script](/tools/setup.sh#L40).
16+
17+

.github/renovate.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/Build.yaml

Lines changed: 41 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -11,45 +11,8 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
build:
15-
runs-on: ubuntu-latest
16-
timeout-minutes: 90
17-
18-
steps:
19-
- name: Checkout
20-
uses: actions/checkout@v3
21-
22-
- name: Validate Gradle Wrapper
23-
uses: gradle/wrapper-validation-action@v1
24-
25-
- name: Copy CI gradle.properties
26-
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
27-
28-
- name: Set up JDK 17
29-
uses: actions/setup-java@v3
30-
with:
31-
distribution: 'zulu'
32-
java-version: 17
33-
34-
- name: Setup Gradle
35-
uses: gradle/gradle-build-action@v2
36-
37-
- name: Check spotless
38-
run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache
39-
40-
- name: Build all build type and flavor permutations
41-
run: ./gradlew assemble
42-
43-
- name: Upload build outputs (APKs)
44-
uses: actions/upload-artifact@v3
45-
with:
46-
name: APKs
47-
path: '**/build/outputs/apk/**/*.apk'
48-
49-
- name: Run local tests
50-
run: ./gradlew testDemoDebug testProdDebug
51-
52-
test:
14+
test_and_apk:
15+
name: "Local tests and APKs"
5316
runs-on: ubuntu-latest
5417

5518
permissions:
@@ -59,7 +22,7 @@ jobs:
5922

6023
steps:
6124
- name: Checkout
62-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
6326

6427
- name: Validate Gradle Wrapper
6528
uses: gradle/wrapper-validation-action@v1
@@ -68,14 +31,20 @@ jobs:
6831
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
6932

7033
- name: Set up JDK 17
71-
uses: actions/setup-java@v3
34+
uses: actions/setup-java@v4
7235
with:
7336
distribution: 'zulu'
7437
java-version: 17
7538

7639
- name: Setup Gradle
7740
uses: gradle/gradle-build-action@v2
7841

42+
- name: Check build-logic
43+
run: ./gradlew check -p build-logic
44+
45+
- name: Check spotless
46+
run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache
47+
7948
- name: Run all local screenshot tests (Roborazzi)
8049
id: screenshotsverify
8150
continue-on-error: true
@@ -96,7 +65,7 @@ jobs:
9665
./gradlew recordRoborazziDemoDebug
9766
9867
- name: Push new screenshots if available
99-
uses: stefanzweifel/git-auto-commit-action@v4
68+
uses: stefanzweifel/git-auto-commit-action@v5
10069
if: steps.screenshotsrecord.outcome == 'success'
10170
with:
10271
file_pattern: '*/*.png'
@@ -106,11 +75,30 @@ jobs:
10675
# Run local tests after screenshot tests to avoid wrong UP-TO-DATE. TODO: Ignore screenshots.
10776
- name: Run local tests
10877
if: always()
109-
run: ./gradlew testDemoDebug testProdDebug
78+
run: ./gradlew testDemoDebug :lint:test
79+
# Replace task exclusions with `-Pandroidx.baselineprofile.skipgeneration` when
80+
# https://android-review.googlesource.com/c/platform/frameworks/support/+/2602790 landed in a
81+
# release build
82+
- name: Build all build type and flavor permutations
83+
run: ./gradlew :app:assemble :benchmarks:assemble
84+
-x pixel6Api33ProdNonMinifiedReleaseAndroidTest
85+
-x pixel6Api33ProdNonMinifiedBenchmarkAndroidTest
86+
-x pixel6Api33DemoNonMinifiedReleaseAndroidTest
87+
-x pixel6Api33DemoNonMinifiedBenchmarkAndroidTest
88+
-x collectDemoNonMinifiedReleaseBaselineProfile
89+
-x collectDemoNonMinifiedBenchmarkBaselineProfile
90+
-x collectProdNonMinifiedReleaseBaselineProfile
91+
-x collectProdNonMinifiedBenchmarkBaselineProfile
92+
93+
- name: Upload build outputs (APKs)
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: APKs
97+
path: '**/build/outputs/apk/**/*.apk'
11098

11199
- name: Upload test results (XML)
112100
if: always()
113-
uses: actions/upload-artifact@v3
101+
uses: actions/upload-artifact@v4
114102
with:
115103
name: test-results
116104
path: '**/build/test-results/test*UnitTest/**.xml'
@@ -120,13 +108,15 @@ jobs:
120108

121109
- name: Upload lint reports (HTML)
122110
if: always()
123-
uses: actions/upload-artifact@v3
111+
uses: actions/upload-artifact@v4
124112
with:
125113
name: lint-reports
126114
path: '**/build/reports/lint-results-*.html'
127115

116+
- name: Check badging
117+
run: ./gradlew :app:checkProdReleaseBadging
118+
128119
androidTest:
129-
needs: build
130120
runs-on: macOS-latest # enables hardware acceleration in the virtual machine
131121
timeout-minutes: 55
132122
strategy:
@@ -135,22 +125,22 @@ jobs:
135125

136126
steps:
137127
- name: Checkout
138-
uses: actions/checkout@v3
128+
uses: actions/checkout@v4
139129

140130
- name: Copy CI gradle.properties
141131
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
142132

143133
- name: Set up JDK 17
144-
uses: actions/setup-java@v3
134+
uses: actions/setup-java@v4
145135
with:
146136
distribution: 'zulu'
147137
java-version: 17
148138

149139
- name: Setup Gradle
150140
uses: gradle/gradle-build-action@v2
151141

152-
- name: Build AndroidTest apps
153-
run: ./gradlew packageDemoDebug packageDemoDebugAndroidTest --daemon
142+
- name: Build projects before running emulator
143+
run: ./gradlew packageDemoDebug packageDemoDebugAndroidTest
154144

155145
- name: Run instrumentation tests
156146
uses: reactivecircus/android-emulator-runner@v2
@@ -164,49 +154,7 @@ jobs:
164154

165155
- name: Upload test reports
166156
if: always()
167-
uses: actions/upload-artifact@v3
157+
uses: actions/upload-artifact@v4
168158
with:
169159
name: test-reports-${{ matrix.api-level }}
170160
path: '**/build/reports/androidTests'
171-
172-
androidTest-GMD:
173-
needs: build
174-
runs-on: macOS-latest # enables hardware acceleration in the virtual machine
175-
timeout-minutes: 90
176-
177-
steps:
178-
- name: Checkout
179-
uses: actions/checkout@v3
180-
181-
- name: Copy CI gradle.properties
182-
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
183-
184-
- name: Set up JDK 17
185-
uses: actions/setup-java@v3
186-
with:
187-
distribution: 'zulu'
188-
java-version: 17
189-
190-
- name: Setup Gradle
191-
uses: gradle/gradle-build-action@v2
192-
193-
- name: Accept Android licenses
194-
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true
195-
196-
- name: Build AndroidTest apps
197-
run: ./gradlew packageDemoDebug packageDemoDebugAndroidTest
198-
199-
- name: Run instrumented tests with GMD
200-
run: ./gradlew ciDemoDebugAndroidTest --no-parallel --max-workers=1
201-
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
202-
203-
- name: Upload test reports
204-
if: success() || failure()
205-
uses: actions/upload-artifact@v3
206-
with:
207-
name: test-reports-GMD
208-
path: '**/build/reports/androidTests'
209-
210-
- name: Print disk space usage
211-
if: failure()
212-
run: df -h

.github/workflows/Release.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ on:
77

88
jobs:
99
build:
10-
runs-on: ubuntu-latest
11-
timeout-minutes: 45
10+
runs-on: macos-latest
11+
timeout-minutes: 120
1212

1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616

1717
- name: Validate Gradle Wrapper
1818
uses: gradle/wrapper-validation-action@v1
@@ -21,14 +21,24 @@ jobs:
2121
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
2222

2323
- name: Set up JDK 17
24-
uses: actions/setup-java@v3
24+
uses: actions/setup-java@v4
2525
with:
2626
distribution: 'zulu'
2727
java-version: 17
2828

29-
- name: Build app
30-
run: ./gradlew :app:assembleDemoRelease
29+
- name: Install GMD image for baseline profile generation
30+
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;aosp_atd;x86_64"
31+
32+
- name: Accept Android licenses
33+
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true
3134

35+
- name: Build release variant including baseline profile generation
36+
run: ./gradlew :app:assembleDemoRelease
37+
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
38+
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
39+
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
40+
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
41+
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1
3242
- name: Create Release
3343
id: create_release
3444
uses: actions/create-release@v1

.idea/copyright/The_Android_Open_Source_Project.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)