Skip to content

Commit

Permalink
Merge branch 'android-remote-main' into main-safe
Browse files Browse the repository at this point in the history
Change-Id: I0939a10e2a8779844d59f9f07ef777ad94283811
  • Loading branch information
Jaehwa-Noh committed May 9, 2024
2 parents 5f124ea + 7f2ce57 commit ca5a7bc
Show file tree
Hide file tree
Showing 65 changed files with 842 additions and 444 deletions.
13 changes: 11 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
Thanks for submitting a pull request. Please include the following information.
_Thanks for submitting a pull request. Please include the following information._

**What I have done and why**
Include a summary of what your pull request contains, and why you have made these changes.

_Include a summary of what your pull request contains, and why you have made these changes._

Fixes #<issue_number_goes_here>

**How I'm testing it**

_Choose at least one:_
- Unit tests
- UI tests
- Screenshot tests
- N/A _(provide justification)_

**Do tests pass?**
- [ ] Run local tests on `DemoDebug` variant: `./gradlew testDemoDebug`
- [ ] Check formatting: `./gradlew --init-script gradle/init.gradle.kts spotlessApply`
Expand Down
52 changes: 45 additions & 7 deletions .github/workflows/Build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:

permissions:
contents: write
pull-requests: write

timeout-minutes: 60

Expand Down Expand Up @@ -100,12 +101,13 @@ jobs:
commit_message: "🤖 Updates screenshots"

# Run local tests after screenshot tests to avoid wrong UP-TO-DATE. TODO: Ignore screenshots.
- name: Run local tests
- name: Run local tests and create report
if: always()
run: ./gradlew testDemoDebug :lint:test
# Replace task exclusions with `-Pandroidx.baselineprofile.skipgeneration` when
# https://android-review.googlesource.com/c/platform/frameworks/support/+/2602790 landed in a
# release build

- name: Build all build type and flavor permutations
run: ./gradlew :app:assemble :benchmarks:assemble
-x pixel6Api33ProdNonMinifiedReleaseAndroidTest
Expand All @@ -119,13 +121,20 @@ jobs:
name: APKs
path: '**/build/outputs/apk/**/*.apk'

- name: Upload test results (XML)
- name: Upload JVM local results (XML)
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
name: local-test-results
path: '**/build/test-results/test*UnitTest/**.xml'

- name: Upload screenshot results (PNG)
if: always()
uses: actions/upload-artifact@v4
with:
name: screenshot-test-results
path: '**/build/outputs/roborazzi/*_compare.png'

- name: Check lint
run: ./gradlew :app:lintProdRelease :app-nia-catalog:lintRelease :lint:lint

Expand Down Expand Up @@ -180,10 +189,7 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v3

- name: Build projects before running emulator
run: ./gradlew packageDemoDebug packageDemoDebugAndroidTest

- name: Run instrumentation tests
- name: Build projects and run instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
Expand All @@ -193,9 +199,41 @@ jobs:
heap-size: 600M
script: ./gradlew connectedDemoDebugAndroidTest --daemon

- name: Run local tests (including Roborazzi) for the combined coverage report (only API 30)
if: matrix.api-level == 30
# There is no need to verify Roborazzi tests to generate coverage.
run: ./gradlew testDemoDebugUnitTest -Proborazzi.test.verify=false # Add Prod if we ever add JVM tests for prod

# Add `createProdDebugUnitTestCoverageReport` if we ever add JVM tests for prod
- name: Generate coverage reports for Debug variants (only API 30)
if: matrix.api-level == 30
run: ./gradlew createDemoDebugCombinedCoverageReport

- name: Upload test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: test-reports-${{ matrix.api-level }}
path: '**/build/reports/androidTests'

- name: Display local test coverage (only API 30)
if: matrix.api-level == 30
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
with:
title: Combined test coverage report
min-coverage-overall: 40
min-coverage-changed-files: 60
paths: |
${{ github.workspace }}/**/build/reports/jacoco/**/*Report.xml
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload local coverage reports (XML + HTML) (only API 30)
if: matrix.api-level == 30
uses: actions/upload-artifact@v4
with:
name: coverage-reports
if-no-files-found: error
compression-level: 1
overwrite: false
path: '**/build/reports/jacoco/'
2 changes: 1 addition & 1 deletion app-nia-catalog/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ android {
// To publish on the Play store a private signing key is required, but to allow anyone
// who clones the code to sign and run the release variant, use the debug signing key.
// TODO: Abstract the signing configuration to a separate file to avoid hardcoding this.
signingConfig = signingConfigs.getByName("debug")
signingConfig = signingConfigs.named("debug").get()
}
}
}
Expand Down
9 changes: 5 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ plugins {
alias(libs.plugins.nowinandroid.android.application.flavors)
alias(libs.plugins.nowinandroid.android.application.jacoco)
alias(libs.plugins.nowinandroid.android.hilt)
id("jacoco")
alias(libs.plugins.nowinandroid.android.application.firebase)
id("com.google.android.gms.oss-licenses-plugin")
alias(libs.plugins.baselineprofile)
Expand Down Expand Up @@ -53,7 +52,7 @@ android {
// To publish on the Play store a private signing key is required, but to allow anyone
// who clones the code to sign and run the release variant, use the debug signing key.
// TODO: Abstract the signing configuration to a separate file to avoid hardcoding this.
signingConfig = signingConfigs.getByName("debug")
signingConfig = signingConfigs.named("debug").get()
// Ensure Baseline Profile is fresh for release builds.
baselineProfile.automaticGenerationDuringBuild = true
}
Expand Down Expand Up @@ -101,6 +100,7 @@ dependencies {
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.profileinstaller)
implementation(libs.androidx.tracing.ktx)
implementation(libs.androidx.window.core)
implementation(libs.kotlinx.coroutines.guava)
implementation(libs.coil.kt)

Expand All @@ -113,7 +113,8 @@ dependencies {

testImplementation(projects.core.dataTest)
testImplementation(projects.core.testing)
testImplementation(libs.accompanist.testharness)
testImplementation(projects.sync.syncTest)
testImplementation(libs.androidx.compose.ui.test)
testImplementation(libs.hilt.android.testing)
testImplementation(libs.work.testing)

Expand All @@ -126,7 +127,7 @@ dependencies {
androidTestImplementation(projects.core.datastoreTest)
androidTestImplementation(libs.androidx.test.espresso.core)
androidTestImplementation(libs.androidx.navigation.testing)
androidTestImplementation(libs.accompanist.testharness)
androidTestImplementation(libs.androidx.compose.ui.test)
androidTestImplementation(libs.hilt.android.testing)

baselineProfile(projects.benchmarks)
Expand Down
122 changes: 63 additions & 59 deletions app/dependencies/prodReleaseRuntimeClasspath.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ androidx.activity:activity-compose:1.8.0
androidx.activity:activity-ktx:1.8.0
androidx.activity:activity:1.8.0
androidx.annotation:annotation-experimental:1.4.0
androidx.annotation:annotation-jvm:1.7.1
androidx.annotation:annotation:1.7.1
androidx.annotation:annotation-jvm:1.8.0-beta01
androidx.annotation:annotation:1.8.0-beta01
androidx.appcompat:appcompat-resources:1.6.1
androidx.appcompat:appcompat:1.6.1
androidx.arch.core:core-common:2.2.0
Expand All @@ -13,20 +13,20 @@ androidx.browser:browser:1.8.0
androidx.collection:collection-jvm:1.4.0
androidx.collection:collection-ktx:1.4.0
androidx.collection:collection:1.4.0
androidx.compose.animation:animation-android:1.6.3
androidx.compose.animation:animation-core-android:1.6.3
androidx.compose.animation:animation-core:1.6.3
androidx.compose.animation:animation:1.6.3
androidx.compose.foundation:foundation-android:1.6.3
androidx.compose.foundation:foundation-layout-android:1.6.3
androidx.compose.foundation:foundation-layout:1.6.3
androidx.compose.foundation:foundation:1.6.3
androidx.compose.material3.adaptive:adaptive-android:1.0.0-alpha08
androidx.compose.material3.adaptive:adaptive-layout-android:1.0.0-alpha08
androidx.compose.material3.adaptive:adaptive-layout:1.0.0-alpha08
androidx.compose.material3.adaptive:adaptive-navigation-android:1.0.0-alpha08
androidx.compose.material3.adaptive:adaptive-navigation:1.0.0-alpha08
androidx.compose.material3.adaptive:adaptive:1.0.0-alpha08
androidx.compose.animation:animation-android:1.7.0-alpha06
androidx.compose.animation:animation-core-android:1.7.0-alpha06
androidx.compose.animation:animation-core:1.7.0-alpha06
androidx.compose.animation:animation:1.7.0-alpha06
androidx.compose.foundation:foundation-android:1.7.0-alpha06
androidx.compose.foundation:foundation-layout-android:1.7.0-alpha06
androidx.compose.foundation:foundation-layout:1.7.0-alpha06
androidx.compose.foundation:foundation:1.7.0-alpha06
androidx.compose.material3.adaptive:adaptive-android:1.0.0-alpha10
androidx.compose.material3.adaptive:adaptive-layout-android:1.0.0-alpha10
androidx.compose.material3.adaptive:adaptive-layout:1.0.0-alpha10
androidx.compose.material3.adaptive:adaptive-navigation-android:1.0.0-alpha10
androidx.compose.material3.adaptive:adaptive-navigation:1.0.0-alpha10
androidx.compose.material3.adaptive:adaptive:1.0.0-alpha10
androidx.compose.material3:material3-android:1.2.1
androidx.compose.material3:material3-window-size-class-android:1.2.1
androidx.compose.material3:material3-window-size-class:1.2.1
Expand All @@ -37,25 +37,25 @@ androidx.compose.material:material-icons-extended-android:1.6.3
androidx.compose.material:material-icons-extended:1.6.3
androidx.compose.material:material-ripple-android:1.6.3
androidx.compose.material:material-ripple:1.6.3
androidx.compose.runtime:runtime-android:1.6.3
androidx.compose.runtime:runtime-saveable-android:1.6.3
androidx.compose.runtime:runtime-saveable:1.6.3
androidx.compose.runtime:runtime-android:1.7.0-alpha06
androidx.compose.runtime:runtime-saveable-android:1.7.0-alpha06
androidx.compose.runtime:runtime-saveable:1.7.0-alpha06
androidx.compose.runtime:runtime-tracing:1.0.0-beta01
androidx.compose.runtime:runtime:1.6.3
androidx.compose.ui:ui-android:1.6.3
androidx.compose.ui:ui-geometry-android:1.6.3
androidx.compose.ui:ui-geometry:1.6.3
androidx.compose.ui:ui-graphics-android:1.6.3
androidx.compose.ui:ui-graphics:1.6.3
androidx.compose.ui:ui-text-android:1.6.3
androidx.compose.ui:ui-text:1.6.3
androidx.compose.ui:ui-tooling-preview-android:1.6.3
androidx.compose.ui:ui-tooling-preview:1.6.3
androidx.compose.ui:ui-unit-android:1.6.3
androidx.compose.ui:ui-unit:1.6.3
androidx.compose.ui:ui-util-android:1.6.3
androidx.compose.ui:ui-util:1.6.3
androidx.compose.ui:ui:1.6.3
androidx.compose.runtime:runtime:1.7.0-alpha06
androidx.compose.ui:ui-android:1.7.0-alpha06
androidx.compose.ui:ui-geometry-android:1.7.0-alpha06
androidx.compose.ui:ui-geometry:1.7.0-alpha06
androidx.compose.ui:ui-graphics-android:1.7.0-alpha06
androidx.compose.ui:ui-graphics:1.7.0-alpha06
androidx.compose.ui:ui-text-android:1.7.0-alpha06
androidx.compose.ui:ui-text:1.7.0-alpha06
androidx.compose.ui:ui-tooling-preview-android:1.7.0-alpha06
androidx.compose.ui:ui-tooling-preview:1.7.0-alpha06
androidx.compose.ui:ui-unit-android:1.7.0-alpha06
androidx.compose.ui:ui-unit:1.7.0-alpha06
androidx.compose.ui:ui-util-android:1.7.0-alpha06
androidx.compose.ui:ui-util:1.7.0-alpha06
androidx.compose.ui:ui:1.7.0-alpha06
androidx.compose:compose-bom:2024.02.02
androidx.concurrent:concurrent-futures:1.1.0
androidx.core:core-ktx:1.12.0
Expand All @@ -74,34 +74,40 @@ androidx.emoji2:emoji2-views-helper:1.3.0
androidx.emoji2:emoji2:1.3.0
androidx.exifinterface:exifinterface:1.3.7
androidx.fragment:fragment:1.5.1
androidx.graphics:graphics-path:1.0.0-beta02
androidx.hilt:hilt-common:1.1.0
androidx.hilt:hilt-navigation-compose:1.2.0
androidx.hilt:hilt-navigation:1.2.0
androidx.hilt:hilt-work:1.1.0
androidx.interpolator:interpolator:1.0.0
androidx.legacy:legacy-support-core-utils:1.0.0
androidx.lifecycle:lifecycle-common-java8:2.7.0
androidx.lifecycle:lifecycle-common:2.7.0
androidx.lifecycle:lifecycle-livedata-core-ktx:2.7.0
androidx.lifecycle:lifecycle-livedata-core:2.7.0
androidx.lifecycle:lifecycle-livedata:2.7.0
androidx.lifecycle:lifecycle-process:2.7.0
androidx.lifecycle:lifecycle-runtime-compose:2.7.0
androidx.lifecycle:lifecycle-runtime-ktx:2.7.0
androidx.lifecycle:lifecycle-runtime:2.7.0
androidx.lifecycle:lifecycle-service:2.7.0
androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0
androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.7.0
androidx.lifecycle:lifecycle-viewmodel:2.7.0
androidx.lifecycle:lifecycle-common-java8:2.8.0-alpha04
androidx.lifecycle:lifecycle-common-jvm:2.8.0-alpha04
androidx.lifecycle:lifecycle-common:2.8.0-alpha04
androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.0-alpha04
androidx.lifecycle:lifecycle-livedata-core:2.8.0-alpha04
androidx.lifecycle:lifecycle-livedata:2.8.0-alpha04
androidx.lifecycle:lifecycle-process:2.8.0-alpha04
androidx.lifecycle:lifecycle-runtime-android:2.8.0-alpha04
androidx.lifecycle:lifecycle-runtime-compose:2.8.0-alpha04
androidx.lifecycle:lifecycle-runtime-ktx-android:2.8.0-alpha04
androidx.lifecycle:lifecycle-runtime-ktx:2.8.0-alpha04
androidx.lifecycle:lifecycle-runtime:2.8.0-alpha04
androidx.lifecycle:lifecycle-service:2.8.0-alpha04
androidx.lifecycle:lifecycle-viewmodel-android:2.8.0-alpha04
androidx.lifecycle:lifecycle-viewmodel-compose-android:2.8.0-alpha04
androidx.lifecycle:lifecycle-viewmodel-compose:2.8.0-alpha04
androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.0-alpha04
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.0-alpha04
androidx.lifecycle:lifecycle-viewmodel:2.8.0-alpha04
androidx.loader:loader:1.0.0
androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
androidx.metrics:metrics-performance:1.0.0-alpha04
androidx.navigation:navigation-common-ktx:2.7.4
androidx.navigation:navigation-common:2.7.4
androidx.navigation:navigation-compose:2.7.4
androidx.navigation:navigation-runtime-ktx:2.7.4
androidx.navigation:navigation-runtime:2.7.4
androidx.navigation:navigation-common-ktx:2.8.0-alpha06
androidx.navigation:navigation-common:2.8.0-alpha06
androidx.navigation:navigation-compose:2.8.0-alpha06
androidx.navigation:navigation-runtime-ktx:2.8.0-alpha06
androidx.navigation:navigation-runtime:2.8.0-alpha06
androidx.print:print:1.0.0
androidx.privacysandbox.ads:ads-adservices-java:1.0.0-beta05
androidx.privacysandbox.ads:ads-adservices:1.0.0-beta05
Expand All @@ -123,14 +129,14 @@ androidx.vectordrawable:vectordrawable:1.1.0
androidx.versionedparcelable:versionedparcelable:1.1.1
androidx.viewpager:viewpager:1.0.0
androidx.window.extensions.core:core:1.0.0
androidx.window:window-core-android:1.3.0-alpha02
androidx.window:window-core:1.3.0-alpha02
androidx.window:window:1.3.0-alpha02
androidx.window:window-core-android:1.3.0-alpha03
androidx.window:window-core:1.3.0-alpha03
androidx.window:window:1.3.0-alpha03
androidx.work:work-runtime-ktx:2.9.0
androidx.work:work-runtime:2.9.0
com.caverock:androidsvg-aar:1.4
com.google.accompanist:accompanist-drawablepainter:0.32.0
com.google.accompanist:accompanist-permissions:0.32.0
com.google.accompanist:accompanist-permissions:0.34.0
com.google.android.datatransport:transport-api:3.0.0
com.google.android.datatransport:transport-backend-cct:3.1.9
com.google.android.datatransport:transport-runtime:3.1.9
Expand Down Expand Up @@ -195,8 +201,6 @@ io.coil-kt:coil-compose-base:2.6.0
io.coil-kt:coil-compose:2.6.0
io.coil-kt:coil-svg:2.6.0
io.coil-kt:coil:2.6.0
io.github.aakira:napier-android:1.4.1
io.github.aakira:napier:1.4.1
javax.inject:javax.inject:1
org.checkerframework:checker-qual:3.12.0
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.22
Expand Down
5 changes: 3 additions & 2 deletions app/prodRelease-badging.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.POST_NOTIFICATIONS'
uses-permission: name='android.permission.WAKE_LOCK'
uses-permission: name='com.google.android.c2dm.permission.RECEIVE'
uses-permission: name='com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE'
uses-permission: name='android.permission.RECEIVE_BOOT_COMPLETED'
uses-permission: name='android.permission.FOREGROUND_SERVICE'
uses-permission: name='com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE'
uses-permission: name='com.google.samples.apps.nowinandroid.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION'
application-label:'Now in Android'
application-label-af:'Now in Android'
Expand Down Expand Up @@ -105,9 +105,9 @@ application-icon-640:'res/mipmap-anydpi-v26/ic_launcher.xml'
application-icon-65534:'res/mipmap-anydpi-v26/ic_launcher.xml'
application: label='Now in Android' icon='res/mipmap-anydpi-v26/ic_launcher.xml'
launchable-activity: name='com.google.samples.apps.nowinandroid.MainActivity' label='' icon=''
uses-library-not-required:'android.ext.adservices'
uses-library-not-required:'androidx.window.extensions'
uses-library-not-required:'androidx.window.sidecar'
uses-library-not-required:'android.ext.adservices'
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
Expand All @@ -119,3 +119,4 @@ supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--' 'af' 'am' 'ar' 'as' 'az' 'be' 'bg' 'bn' 'bs' 'ca' 'cs' 'da' 'de' 'el' 'en-AU' 'en-CA' 'en-GB' 'en-IN' 'en-XC' 'es' 'es-US' 'et' 'eu' 'fa' 'fi' 'fr' 'fr-CA' 'gl' 'gu' 'hi' 'hr' 'hu' 'hy' 'in' 'is' 'it' 'iw' 'ja' 'ka' 'kk' 'km' 'kn' 'ko' 'ky' 'lo' 'lt' 'lv' 'mk' 'ml' 'mn' 'mr' 'ms' 'my' 'nb' 'ne' 'nl' 'or' 'pa' 'pl' 'pt' 'pt-BR' 'pt-PT' 'ro' 'ru' 'si' 'sk' 'sl' 'sq' 'sr' 'sr-Latn' 'sv' 'sw' 'ta' 'te' 'th' 'tl' 'tr' 'uk' 'ur' 'uz' 'vi' 'zh-CN' 'zh-HK' 'zh-TW' 'zu'
densities: '120' '160' '240' '320' '480' '640' '65534'
native-code: 'arm64-v8a' 'armeabi-v7a' 'x86' 'x86_64'
Loading

0 comments on commit ca5a7bc

Please sign in to comment.