Skip to content

Commit 2a4eeee

Browse files
committed
Merge branch 'android-remote-main' into api-21
Change-Id: Ie13a81d4a4534ea278e3d52cb233ed4c54add8ba
2 parents 6332722 + d15c739 commit 2a4eeee

File tree

11 files changed

+35
-14
lines changed

11 files changed

+35
-14
lines changed

.github/ci-gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
org.gradle.daemon=false
1818
org.gradle.parallel=true
1919
org.gradle.workers.max=2
20+
org.gradle.configuration-cache=true
21+
org.gradle.configuration-cache.parallel=true
2022

2123
kotlin.incremental=false
2224

.github/renovate.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"main"
88
],
99
"gitIgnoredAuthors": [
10+
"renovate[bot]@users.noreply.github.com",
11+
"github-actions[bot]@users.noreply.github.com",
1012
"41898282+github-actions[bot]@users.noreply.github.com"
1113
]
1214
}

.github/workflows/Build.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ jobs:
3737

3838
- name: Setup Gradle
3939
uses: gradle/actions/setup-gradle@v4
40+
with:
41+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
4042

4143
- name: Check build-logic
42-
run: ./gradlew check -p build-logic
44+
run: ./gradlew :build-logic:convention:check
4345

4446
- name: Check spotless
4547
run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache
@@ -186,6 +188,8 @@ jobs:
186188

187189
- name: Setup Gradle
188190
uses: gradle/actions/setup-gradle@v4
191+
with:
192+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
189193

190194
- name: Build projects and run instrumentation tests
191195
uses: reactivecircus/android-emulator-runner@v2

.github/workflows/NightlyBaselineProfiles.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636

3737
- name: Setup Gradle
3838
uses: gradle/actions/setup-gradle@v4
39+
with:
40+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
3941

4042
- name: Setup Android SDK
4143
uses: android-actions/setup-android@v3
@@ -44,7 +46,7 @@ jobs:
4446
run: yes | sdkmanager --licenses || true
4547

4648
- name: Check build-logic
47-
run: ./gradlew check -p build-logic
49+
run: ./gradlew :build-logic:convention:check
4850

4951
- name: Setup GMD
5052
run: ./gradlew :benchmarks:pixel6Api33Setup
@@ -57,4 +59,4 @@ jobs:
5759
run: ./gradlew :app:generateReleaseBaselineProfile
5860
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=baselineprofile
5961
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
60-
--stacktrace
62+
--stacktrace

.github/workflows/Release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333

3434
- name: Setup Gradle
3535
uses: gradle/actions/setup-gradle@v4
36+
with:
37+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
3638

3739
- name: Setup Android SDK
3840
uses: android-actions/setup-android@v3

app/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,16 @@ dependencies {
116116
testImplementation(projects.sync.syncTest)
117117
testImplementation(libs.kotlin.test)
118118

119+
testDemoImplementation(libs.androidx.navigation.testing)
119120
testDemoImplementation(libs.robolectric)
120121
testDemoImplementation(libs.roborazzi)
121122
testDemoImplementation(projects.core.screenshotTesting)
123+
testDemoImplementation(projects.core.testing)
122124

123125
androidTestImplementation(projects.core.testing)
124126
androidTestImplementation(projects.core.dataTest)
125127
androidTestImplementation(projects.core.datastoreTest)
126128
androidTestImplementation(libs.androidx.test.espresso.core)
127-
androidTestImplementation(libs.androidx.navigation.testing)
128129
androidTestImplementation(libs.androidx.compose.ui.test)
129130
androidTestImplementation(libs.hilt.android.testing)
130131
androidTestImplementation(libs.kotlin.test)

app/dependencies/prodReleaseRuntimeClasspath.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,12 @@ org.jetbrains.kotlin:kotlin-stdlib-common:2.1.0
216216
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.0
217217
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0
218218
org.jetbrains.kotlin:kotlin-stdlib:2.1.0
219-
org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0
220-
org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.9.0
221-
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.9.0
222-
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0
223-
org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.9.0
224-
org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.9.0
219+
org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.0
220+
org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.10.0
221+
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.10.0
222+
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.0
223+
org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.10.0
224+
org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.10.0
225225
org.jetbrains.kotlinx:kotlinx-datetime-jvm:0.6.1
226226
org.jetbrains.kotlinx:kotlinx-datetime:0.6.1
227227
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.7.3

app/src/androidTest/kotlin/com/google/samples/apps/nowinandroid/ui/NiaAppStateTest.kt renamed to app/src/testDemo/kotlin/com/google/samples/apps/nowinandroid/ui/NiaAppStateTest.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,27 @@ import com.google.samples.apps.nowinandroid.core.testing.repository.TestNewsRepo
3131
import com.google.samples.apps.nowinandroid.core.testing.repository.TestUserDataRepository
3232
import com.google.samples.apps.nowinandroid.core.testing.util.TestNetworkMonitor
3333
import com.google.samples.apps.nowinandroid.core.testing.util.TestTimeZoneMonitor
34+
import dagger.hilt.android.testing.HiltAndroidTest
35+
import dagger.hilt.android.testing.HiltTestApplication
3436
import kotlinx.coroutines.flow.collect
3537
import kotlinx.coroutines.launch
3638
import kotlinx.coroutines.test.UnconfinedTestDispatcher
3739
import kotlinx.coroutines.test.runTest
3840
import kotlinx.datetime.TimeZone
3941
import org.junit.Rule
4042
import org.junit.Test
43+
import org.junit.runner.RunWith
44+
import org.robolectric.RobolectricTestRunner
45+
import org.robolectric.annotation.Config
4146
import kotlin.test.assertEquals
4247
import kotlin.test.assertTrue
4348

4449
/**
4550
* Tests [NiaAppState].
46-
*
47-
* Note: This could become an unit test if Robolectric is added to the project and the Context
48-
* is faked.
4951
*/
52+
@RunWith(RobolectricTestRunner::class)
53+
@Config(application = HiltTestApplication::class)
54+
@HiltAndroidTest
5055
class NiaAppStateTest {
5156

5257
@get:Rule

build-logic/gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
org.gradle.parallel=true
33
org.gradle.caching=true
44
org.gradle.configureondemand=true
5+
org.gradle.configuration-cache=true
6+
org.gradle.configuration-cache.parallel=true

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ org.gradle.caching=true
3939

4040
# Enable configuration caching between builds.
4141
org.gradle.configuration-cache=true
42+
org.gradle.configuration-cache.parallel=true
4243
# This option is set because of https://github.com/google/play-services-plugins/issues/246
4344
# to generate the Configuration Cache regardless of incompatible tasks.
4445
# See https://github.com/android/nowinandroid/issues/1022 before using it.

0 commit comments

Comments
 (0)