Skip to content

Commit 61143ca

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/1161-2
2 parents aa68871 + b85cf7d commit 61143ca

File tree

83 files changed

+3478
-3646
lines changed

Some content is hidden

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

83 files changed

+3478
-3646
lines changed

.github/pull_request_template.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
Thanks for submitting a pull request. Please include the following information.
1+
**DO NOT CREATE A PULL REQUEST WITHOUT READING THESE INSTRUCTIONS**
22

3-
**What I have done and why**
4-
Include a summary of what your pull request contains, and why you have made these changes.
3+
## Instructions
4+
Thanks for submitting a pull request. To accept your pull request we need you do a few things:
5+
6+
**If this is your first pull request**
7+
8+
- [Sign the contributors license agreement](https://cla.developers.google.com/)
9+
10+
**Ensure tests pass and code is formatted correctly**
511

6-
Fixes #<issue_number_goes_here>
12+
- Run local tests on the `DemoDebug` variant by running `./gradlew testDemoDebug`
13+
- Fix code formatting: `./gradlew --init-script gradle/init.gradle.kts spotlessApply`
714

8-
**Do tests pass?**
9-
- [ ] Run local tests on `DemoDebug` variant: `./gradlew testDemoDebug`
10-
- [ ] Check formatting: `./gradlew --init-script gradle/init.gradle.kts spotlessApply`
15+
**Add a description**
1116

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).
17+
We need to know what you've done and why you've done it. Include a summary of what your pull request contains, and why you have made these changes. Include links to any relevant issues which it fixes.
1618

19+
[Here's an example](https://github.com/android/nowinandroid/pull/1257).
20+
21+
**NOW DELETE THIS LINE AND EVERYTHING ABOVE IT**
22+
23+
**What I have done and why**
1724

25+
\<add your PR description here\>

.github/workflows/Build.yaml

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717

1818
permissions:
1919
contents: write
20+
pull-requests: write
2021

2122
timeout-minutes: 60
2223

@@ -25,7 +26,7 @@ jobs:
2526
uses: actions/checkout@v4
2627

2728
- name: Validate Gradle Wrapper
28-
uses: gradle/wrapper-validation-action@v2
29+
uses: gradle/wrapper-validation-action@v3
2930

3031
- name: Copy CI gradle.properties
3132
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
@@ -100,12 +101,13 @@ jobs:
100101
commit_message: "🤖 Updates screenshots"
101102

102103
# Run local tests after screenshot tests to avoid wrong UP-TO-DATE. TODO: Ignore screenshots.
103-
- name: Run local tests
104+
- name: Run local tests and create report
104105
if: always()
105106
run: ./gradlew testDemoDebug :lint:test
106107
# Replace task exclusions with `-Pandroidx.baselineprofile.skipgeneration` when
107108
# https://android-review.googlesource.com/c/platform/frameworks/support/+/2602790 landed in a
108109
# release build
110+
109111
- name: Build all build type and flavor permutations
110112
run: ./gradlew :app:assemble :benchmarks:assemble
111113
-x pixel6Api33ProdNonMinifiedReleaseAndroidTest
@@ -119,13 +121,20 @@ jobs:
119121
name: APKs
120122
path: '**/build/outputs/apk/**/*.apk'
121123

122-
- name: Upload test results (XML)
124+
- name: Upload JVM local results (XML)
123125
if: always()
124126
uses: actions/upload-artifact@v4
125127
with:
126-
name: test-results
128+
name: local-test-results
127129
path: '**/build/test-results/test*UnitTest/**.xml'
128130

131+
- name: Upload screenshot results (PNG)
132+
if: always()
133+
uses: actions/upload-artifact@v4
134+
with:
135+
name: screenshot-test-results
136+
path: '**/build/outputs/roborazzi/*_compare.png'
137+
129138
- name: Check lint
130139
run: ./gradlew :app:lintProdRelease :app-nia-catalog:lintRelease :lint:lint
131140

@@ -180,10 +189,7 @@ jobs:
180189
- name: Setup Gradle
181190
uses: gradle/gradle-build-action@v3
182191

183-
- name: Build projects before running emulator
184-
run: ./gradlew packageDemoDebug packageDemoDebugAndroidTest
185-
186-
- name: Run instrumentation tests
192+
- name: Build projects and run instrumentation tests
187193
uses: reactivecircus/android-emulator-runner@v2
188194
with:
189195
api-level: ${{ matrix.api-level }}
@@ -193,9 +199,41 @@ jobs:
193199
heap-size: 600M
194200
script: ./gradlew connectedDemoDebugAndroidTest --daemon
195201

202+
- name: Run local tests (including Roborazzi) for the combined coverage report (only API 30)
203+
if: matrix.api-level == 30
204+
# There is no need to verify Roborazzi tests to generate coverage.
205+
run: ./gradlew testDemoDebugUnitTest -Proborazzi.test.verify=false # Add Prod if we ever add JVM tests for prod
206+
207+
# Add `createProdDebugUnitTestCoverageReport` if we ever add JVM tests for prod
208+
- name: Generate coverage reports for Debug variants (only API 30)
209+
if: matrix.api-level == 30
210+
run: ./gradlew createDemoDebugCombinedCoverageReport
211+
196212
- name: Upload test reports
197213
if: always()
198214
uses: actions/upload-artifact@v4
199215
with:
200216
name: test-reports-${{ matrix.api-level }}
201217
path: '**/build/reports/androidTests'
218+
219+
- name: Display local test coverage (only API 30)
220+
if: matrix.api-level == 30
221+
id: jacoco
222+
uses: madrapps/[email protected]
223+
with:
224+
title: Combined test coverage report
225+
min-coverage-overall: 40
226+
min-coverage-changed-files: 60
227+
paths: |
228+
${{ github.workspace }}/**/build/reports/jacoco/**/*Report.xml
229+
token: ${{ secrets.GITHUB_TOKEN }}
230+
231+
- name: Upload local coverage reports (XML + HTML) (only API 30)
232+
if: matrix.api-level == 30
233+
uses: actions/upload-artifact@v4
234+
with:
235+
name: coverage-reports
236+
if-no-files-found: error
237+
compression-level: 1
238+
overwrite: false
239+
path: '**/build/reports/jacoco/'

.github/workflows/Release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: actions/checkout@v4
2323

2424
- name: Validate Gradle Wrapper
25-
uses: gradle/wrapper-validation-action@v2
25+
uses: gradle/wrapper-validation-action@v3
2626

2727
- name: Copy CI gradle.properties
2828
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

app-nia-catalog/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ android {
5959
// To publish on the Play store a private signing key is required, but to allow anyone
6060
// who clones the code to sign and run the release variant, use the debug signing key.
6161
// TODO: Abstract the signing configuration to a separate file to avoid hardcoding this.
62-
signingConfig = signingConfigs.getByName("debug")
62+
signingConfig = signingConfigs.named("debug").get()
6363
}
6464
}
6565
}

app-nia-catalog/dependencies/releaseRuntimeClasspath.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
androidx.activity:activity-compose:1.8.0
2-
androidx.activity:activity-ktx:1.8.0
3-
androidx.activity:activity:1.8.0
1+
androidx.activity:activity-compose:1.8.2
2+
androidx.activity:activity-ktx:1.8.2
3+
androidx.activity:activity:1.8.2
44
androidx.annotation:annotation-experimental:1.4.0
55
androidx.annotation:annotation-jvm:1.7.1
66
androidx.annotation:annotation:1.7.1

app/build.gradle.kts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ plugins {
2121
alias(libs.plugins.nowinandroid.android.application.flavors)
2222
alias(libs.plugins.nowinandroid.android.application.jacoco)
2323
alias(libs.plugins.nowinandroid.android.hilt)
24-
id("jacoco")
2524
alias(libs.plugins.nowinandroid.android.application.firebase)
2625
id("com.google.android.gms.oss-licenses-plugin")
2726
alias(libs.plugins.baselineprofile)
@@ -53,7 +52,7 @@ android {
5352
// To publish on the Play store a private signing key is required, but to allow anyone
5453
// who clones the code to sign and run the release variant, use the debug signing key.
5554
// TODO: Abstract the signing configuration to a separate file to avoid hardcoding this.
56-
signingConfig = signingConfigs.getByName("debug")
55+
signingConfig = signingConfigs.named("debug").get()
5756
// Ensure Baseline Profile is fresh for release builds.
5857
baselineProfile.automaticGenerationDuringBuild = true
5958
}
@@ -101,6 +100,7 @@ dependencies {
101100
implementation(libs.androidx.navigation.compose)
102101
implementation(libs.androidx.profileinstaller)
103102
implementation(libs.androidx.tracing.ktx)
103+
implementation(libs.androidx.window.core)
104104
implementation(libs.kotlinx.coroutines.guava)
105105
implementation(libs.coil.kt)
106106

@@ -112,9 +112,8 @@ dependencies {
112112
kspTest(libs.hilt.compiler)
113113

114114
testImplementation(projects.core.dataTest)
115-
testImplementation(libs.accompanist.testharness)
116115
testImplementation(libs.hilt.android.testing)
117-
testImplementation(libs.work.testing)
116+
testImplementation(projects.sync.syncTest)
118117

119118
testDemoImplementation(libs.robolectric)
120119
testDemoImplementation(libs.roborazzi)
@@ -126,8 +125,7 @@ dependencies {
126125
androidTestImplementation(projects.core.datastoreTest)
127126
androidTestImplementation(libs.androidx.test.espresso.core)
128127
androidTestImplementation(libs.androidx.navigation.testing)
129-
androidTestImplementation(libs.accompanist.testharness)
130-
androidTestImplementation(libs.bundles.androidx.compose.ui.test)
128+
androidTestImplementation(libs.androidx.compose.ui.test)
131129
androidTestImplementation(libs.hilt.android.testing)
132130

133131
baselineProfile(projects.benchmarks)

app/dependencies/prodReleaseRuntimeClasspath.txt

Lines changed: 67 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
androidx.activity:activity-compose:1.8.0
2-
androidx.activity:activity-ktx:1.8.0
3-
androidx.activity:activity:1.8.0
1+
androidx.activity:activity-compose:1.8.2
2+
androidx.activity:activity-ktx:1.8.2
3+
androidx.activity:activity:1.8.2
44
androidx.annotation:annotation-experimental:1.4.0
5-
androidx.annotation:annotation-jvm:1.7.1
6-
androidx.annotation:annotation:1.7.1
5+
androidx.annotation:annotation-jvm:1.8.0-beta01
6+
androidx.annotation:annotation:1.8.0-beta01
77
androidx.appcompat:appcompat-resources:1.6.1
88
androidx.appcompat:appcompat:1.6.1
99
androidx.arch.core:core-common:2.2.0
@@ -13,20 +13,20 @@ androidx.browser:browser:1.8.0
1313
androidx.collection:collection-jvm:1.4.0
1414
androidx.collection:collection-ktx:1.4.0
1515
androidx.collection:collection:1.4.0
16-
androidx.compose.animation:animation-android:1.6.3
17-
androidx.compose.animation:animation-core-android:1.6.3
18-
androidx.compose.animation:animation-core:1.6.3
19-
androidx.compose.animation:animation:1.6.3
20-
androidx.compose.foundation:foundation-android:1.6.3
21-
androidx.compose.foundation:foundation-layout-android:1.6.3
22-
androidx.compose.foundation:foundation-layout:1.6.3
23-
androidx.compose.foundation:foundation:1.6.3
24-
androidx.compose.material3.adaptive:adaptive-android:1.0.0-alpha08
25-
androidx.compose.material3.adaptive:adaptive-layout-android:1.0.0-alpha08
26-
androidx.compose.material3.adaptive:adaptive-layout:1.0.0-alpha08
27-
androidx.compose.material3.adaptive:adaptive-navigation-android:1.0.0-alpha08
28-
androidx.compose.material3.adaptive:adaptive-navigation:1.0.0-alpha08
29-
androidx.compose.material3.adaptive:adaptive:1.0.0-alpha08
16+
androidx.compose.animation:animation-android:1.7.0-alpha06
17+
androidx.compose.animation:animation-core-android:1.7.0-alpha06
18+
androidx.compose.animation:animation-core:1.7.0-alpha06
19+
androidx.compose.animation:animation:1.7.0-alpha06
20+
androidx.compose.foundation:foundation-android:1.7.0-alpha06
21+
androidx.compose.foundation:foundation-layout-android:1.7.0-alpha06
22+
androidx.compose.foundation:foundation-layout:1.7.0-alpha06
23+
androidx.compose.foundation:foundation:1.7.0-alpha06
24+
androidx.compose.material3.adaptive:adaptive-android:1.0.0-alpha10
25+
androidx.compose.material3.adaptive:adaptive-layout-android:1.0.0-alpha10
26+
androidx.compose.material3.adaptive:adaptive-layout:1.0.0-alpha10
27+
androidx.compose.material3.adaptive:adaptive-navigation-android:1.0.0-alpha10
28+
androidx.compose.material3.adaptive:adaptive-navigation:1.0.0-alpha10
29+
androidx.compose.material3.adaptive:adaptive:1.0.0-alpha10
3030
androidx.compose.material3:material3-android:1.2.1
3131
androidx.compose.material3:material3-window-size-class-android:1.2.1
3232
androidx.compose.material3:material3-window-size-class:1.2.1
@@ -37,25 +37,25 @@ androidx.compose.material:material-icons-extended-android:1.6.3
3737
androidx.compose.material:material-icons-extended:1.6.3
3838
androidx.compose.material:material-ripple-android:1.6.3
3939
androidx.compose.material:material-ripple:1.6.3
40-
androidx.compose.runtime:runtime-android:1.6.3
41-
androidx.compose.runtime:runtime-saveable-android:1.6.3
42-
androidx.compose.runtime:runtime-saveable:1.6.3
40+
androidx.compose.runtime:runtime-android:1.7.0-alpha06
41+
androidx.compose.runtime:runtime-saveable-android:1.7.0-alpha06
42+
androidx.compose.runtime:runtime-saveable:1.7.0-alpha06
4343
androidx.compose.runtime:runtime-tracing:1.0.0-beta01
44-
androidx.compose.runtime:runtime:1.6.3
45-
androidx.compose.ui:ui-android:1.6.3
46-
androidx.compose.ui:ui-geometry-android:1.6.3
47-
androidx.compose.ui:ui-geometry:1.6.3
48-
androidx.compose.ui:ui-graphics-android:1.6.3
49-
androidx.compose.ui:ui-graphics:1.6.3
50-
androidx.compose.ui:ui-text-android:1.6.3
51-
androidx.compose.ui:ui-text:1.6.3
52-
androidx.compose.ui:ui-tooling-preview-android:1.6.3
53-
androidx.compose.ui:ui-tooling-preview:1.6.3
54-
androidx.compose.ui:ui-unit-android:1.6.3
55-
androidx.compose.ui:ui-unit:1.6.3
56-
androidx.compose.ui:ui-util-android:1.6.3
57-
androidx.compose.ui:ui-util:1.6.3
58-
androidx.compose.ui:ui:1.6.3
44+
androidx.compose.runtime:runtime:1.7.0-alpha06
45+
androidx.compose.ui:ui-android:1.7.0-alpha06
46+
androidx.compose.ui:ui-geometry-android:1.7.0-alpha06
47+
androidx.compose.ui:ui-geometry:1.7.0-alpha06
48+
androidx.compose.ui:ui-graphics-android:1.7.0-alpha06
49+
androidx.compose.ui:ui-graphics:1.7.0-alpha06
50+
androidx.compose.ui:ui-text-android:1.7.0-alpha06
51+
androidx.compose.ui:ui-text:1.7.0-alpha06
52+
androidx.compose.ui:ui-tooling-preview-android:1.7.0-alpha06
53+
androidx.compose.ui:ui-tooling-preview:1.7.0-alpha06
54+
androidx.compose.ui:ui-unit-android:1.7.0-alpha06
55+
androidx.compose.ui:ui-unit:1.7.0-alpha06
56+
androidx.compose.ui:ui-util-android:1.7.0-alpha06
57+
androidx.compose.ui:ui-util:1.7.0-alpha06
58+
androidx.compose.ui:ui:1.7.0-alpha06
5959
androidx.compose:compose-bom:2024.02.02
6060
androidx.concurrent:concurrent-futures:1.1.0
6161
androidx.core:core-ktx:1.12.0
@@ -74,34 +74,40 @@ androidx.emoji2:emoji2-views-helper:1.3.0
7474
androidx.emoji2:emoji2:1.3.0
7575
androidx.exifinterface:exifinterface:1.3.7
7676
androidx.fragment:fragment:1.5.1
77+
androidx.graphics:graphics-path:1.0.0-beta02
7778
androidx.hilt:hilt-common:1.1.0
7879
androidx.hilt:hilt-navigation-compose:1.2.0
7980
androidx.hilt:hilt-navigation:1.2.0
8081
androidx.hilt:hilt-work:1.1.0
8182
androidx.interpolator:interpolator:1.0.0
8283
androidx.legacy:legacy-support-core-utils:1.0.0
83-
androidx.lifecycle:lifecycle-common-java8:2.7.0
84-
androidx.lifecycle:lifecycle-common:2.7.0
85-
androidx.lifecycle:lifecycle-livedata-core-ktx:2.7.0
86-
androidx.lifecycle:lifecycle-livedata-core:2.7.0
87-
androidx.lifecycle:lifecycle-livedata:2.7.0
88-
androidx.lifecycle:lifecycle-process:2.7.0
89-
androidx.lifecycle:lifecycle-runtime-compose:2.7.0
90-
androidx.lifecycle:lifecycle-runtime-ktx:2.7.0
91-
androidx.lifecycle:lifecycle-runtime:2.7.0
92-
androidx.lifecycle:lifecycle-service:2.7.0
93-
androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0
94-
androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0
95-
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.7.0
96-
androidx.lifecycle:lifecycle-viewmodel:2.7.0
84+
androidx.lifecycle:lifecycle-common-java8:2.8.0-alpha04
85+
androidx.lifecycle:lifecycle-common-jvm:2.8.0-alpha04
86+
androidx.lifecycle:lifecycle-common:2.8.0-alpha04
87+
androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.0-alpha04
88+
androidx.lifecycle:lifecycle-livedata-core:2.8.0-alpha04
89+
androidx.lifecycle:lifecycle-livedata:2.8.0-alpha04
90+
androidx.lifecycle:lifecycle-process:2.8.0-alpha04
91+
androidx.lifecycle:lifecycle-runtime-android:2.8.0-alpha04
92+
androidx.lifecycle:lifecycle-runtime-compose:2.8.0-alpha04
93+
androidx.lifecycle:lifecycle-runtime-ktx-android:2.8.0-alpha04
94+
androidx.lifecycle:lifecycle-runtime-ktx:2.8.0-alpha04
95+
androidx.lifecycle:lifecycle-runtime:2.8.0-alpha04
96+
androidx.lifecycle:lifecycle-service:2.8.0-alpha04
97+
androidx.lifecycle:lifecycle-viewmodel-android:2.8.0-alpha04
98+
androidx.lifecycle:lifecycle-viewmodel-compose-android:2.8.0-alpha04
99+
androidx.lifecycle:lifecycle-viewmodel-compose:2.8.0-alpha04
100+
androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.0-alpha04
101+
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.0-alpha04
102+
androidx.lifecycle:lifecycle-viewmodel:2.8.0-alpha04
97103
androidx.loader:loader:1.0.0
98104
androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
99105
androidx.metrics:metrics-performance:1.0.0-alpha04
100-
androidx.navigation:navigation-common-ktx:2.7.4
101-
androidx.navigation:navigation-common:2.7.4
102-
androidx.navigation:navigation-compose:2.7.4
103-
androidx.navigation:navigation-runtime-ktx:2.7.4
104-
androidx.navigation:navigation-runtime:2.7.4
106+
androidx.navigation:navigation-common-ktx:2.8.0-alpha06
107+
androidx.navigation:navigation-common:2.8.0-alpha06
108+
androidx.navigation:navigation-compose:2.8.0-alpha06
109+
androidx.navigation:navigation-runtime-ktx:2.8.0-alpha06
110+
androidx.navigation:navigation-runtime:2.8.0-alpha06
105111
androidx.print:print:1.0.0
106112
androidx.privacysandbox.ads:ads-adservices-java:1.0.0-beta05
107113
androidx.privacysandbox.ads:ads-adservices:1.0.0-beta05
@@ -123,9 +129,9 @@ androidx.vectordrawable:vectordrawable:1.1.0
123129
androidx.versionedparcelable:versionedparcelable:1.1.1
124130
androidx.viewpager:viewpager:1.0.0
125131
androidx.window.extensions.core:core:1.0.0
126-
androidx.window:window-core-android:1.3.0-alpha02
127-
androidx.window:window-core:1.3.0-alpha02
128-
androidx.window:window:1.3.0-alpha02
132+
androidx.window:window-core-android:1.3.0-alpha03
133+
androidx.window:window-core:1.3.0-alpha03
134+
androidx.window:window:1.3.0-alpha03
129135
androidx.work:work-runtime-ktx:2.9.0
130136
androidx.work:work-runtime:2.9.0
131137
com.caverock:androidsvg-aar:1.4
@@ -182,8 +188,8 @@ com.google.guava:failureaccess:1.0.1
182188
com.google.guava:guava:31.1-android
183189
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
184190
com.google.j2objc:j2objc-annotations:1.3
185-
com.google.protobuf:protobuf-javalite:3.25.2
186-
com.google.protobuf:protobuf-kotlin-lite:3.25.2
191+
com.google.protobuf:protobuf-javalite:4.26.0
192+
com.google.protobuf:protobuf-kotlin-lite:4.26.0
187193
com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:1.0.0
188194
com.squareup.okhttp3:logging-interceptor:4.12.0
189195
com.squareup.okhttp3:okhttp:4.12.0

0 commit comments

Comments
 (0)