Skip to content

Commit d4df5c8

Browse files
committed
Merge remote-tracking branch 'origin/main' into migration-coil2-coil3
2 parents c7feb74 + 974d6b8 commit d4df5c8

File tree

37 files changed

+352
-255
lines changed

37 files changed

+352
-255
lines changed

.github/workflows/Build.yaml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- main
@@ -29,16 +30,19 @@ jobs:
2930
- name: Copy CI gradle.properties
3031
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
3132

32-
- name: Set up JDK 17
33+
- name: Set up JDK 21
3334
uses: actions/setup-java@v4
3435
with:
3536
distribution: 'zulu'
36-
java-version: 17
37+
java-version: 21
3738

3839
- name: Setup Gradle
3940
uses: gradle/actions/setup-gradle@v4
4041
with:
4142
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
43+
build-scan-publish: true
44+
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
45+
build-scan-terms-of-use-agree: "yes"
4246

4347
- name: Check build-logic
4448
run: ./gradlew :build-logic:convention:check
@@ -139,11 +143,26 @@ jobs:
139143
name: lint-reports
140144
path: '**/build/reports/lint-results-*.html'
141145

142-
- name: Upload lint reports (SARIF)
143-
if: ${{ !cancelled() && hashFiles('**/*.sarif') != '' }}
146+
- name: Upload lint reports (SARIF) for app module
147+
if: ${{ !cancelled() && hashFiles('app/**/*.sarif') != '' }}
144148
uses: github/codeql-action/upload-sarif@v3
145149
with:
146-
sarif_file: './'
150+
sarif_file: './app/'
151+
category: app
152+
153+
- name: Upload lint reports (SARIF) for app-nia-catalog module
154+
if: ${{ !cancelled() && hashFiles('app-nia-catalog/**/*.sarif') != '' }}
155+
uses: github/codeql-action/upload-sarif@v3
156+
with:
157+
sarif_file: './app-nia-catalog/'
158+
category: app-nia-catalog
159+
160+
- name: Upload lint reports (SARIF) for lint module
161+
if: ${{ !cancelled() && hashFiles('lint/**/*.sarif') != '' }}
162+
uses: github/codeql-action/upload-sarif@v3
163+
with:
164+
sarif_file: './lint/'
165+
category: lint
147166

148167
- name: Check badging
149168
run: ./gradlew :app:checkProdReleaseBadging
@@ -180,16 +199,19 @@ jobs:
180199
- name: Copy CI gradle.properties
181200
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
182201

183-
- name: Set up JDK 17
202+
- name: Set up JDK 21
184203
uses: actions/setup-java@v4
185204
with:
186205
distribution: 'zulu'
187-
java-version: 17
206+
java-version: 21
188207

189208
- name: Setup Gradle
190209
uses: gradle/actions/setup-gradle@v4
191210
with:
192211
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
212+
build-scan-publish: true
213+
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
214+
build-scan-terms-of-use-agree: "yes"
193215

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

.github/workflows/NightlyBaselineProfiles.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: NightlyBaselineProfiles
22

33
on:
4+
workflow_dispatch:
45
schedule:
56
- cron: '42 4 * * *'
67

@@ -39,6 +40,9 @@ jobs:
3940
uses: gradle/actions/setup-gradle@v4
4041
with:
4142
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
43+
build-scan-publish: true
44+
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
45+
build-scan-terms-of-use-agree: "yes"
4246

4347
- name: Setup Android SDK
4448
uses: android-actions/setup-android@v3

.github/workflows/Release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: GitHub Release with APKs
22

33
on:
4+
workflow_dispatch:
45
push:
56
tags:
67
- 'v*'
@@ -36,6 +37,9 @@ jobs:
3637
uses: gradle/actions/setup-gradle@v4
3738
with:
3839
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
40+
build-scan-publish: true
41+
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
42+
build-scan-terms-of-use-agree: "yes"
3943

4044
- name: Setup Android SDK
4145
uses: android-actions/setup-android@v3
@@ -75,4 +79,4 @@ jobs:
7579
upload_url: ${{ steps.create_release.outputs.upload_url }}
7680
asset_path: app/build/outputs/apk/demo/release/app-demo-release.apk
7781
asset_name: app-demo-release.apk
78-
asset_content_type: application/vnd.android.package-archive
82+
asset_content_type: application/vnd.android.package-archive

AGENT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

AGENTS.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Now in Android Project
2+
3+
Now in Android is a native Android mobile application written in Kotlin. It provides regular news
4+
about Android development. Users can choose to follow topics, be notified when new content is
5+
available, and bookmark items.
6+
7+
## Architecture
8+
9+
This project is a modern Android application that follows the official architecture guidance from Google. It is a reactive, single-activity app that uses the following:
10+
11+
- **UI:** Built entirely with Jetpack Compose, including Material 3 components and adaptive layouts for different screen sizes.
12+
- **State Management:** Unidirectional Data Flow (UDF) is implemented using Kotlin Coroutines and `Flow`s. `ViewModel`s act as state holders, exposing UI state as streams of data.
13+
- **Dependency Injection:** Hilt is used for dependency injection throughout the app, simplifying the management of dependencies and improving testability.
14+
- **Navigation:** Navigation is handled by Jetpack Navigation 2 for Compose, allowing for a declarative and type-safe way to navigate between screens.
15+
- **Data:** The data layer is implemented using the repository pattern.
16+
- **Local Data:** Room and DataStore are used for local data persistence.
17+
- **Remote Data:** Retrofit and OkHttp are used for fetching data from the network.
18+
- **Background Processing:** WorkManager is used for deferrable background tasks.
19+
20+
## Modules
21+
22+
The main Android app lives in the `app/` folder. Feature modules live in `feature/` and core and shared modules in `core/`.
23+
24+
## Commands to Build & Test
25+
26+
The app and Android libraries have two product flavors: `demo` and `prod`, and two build types: `debug` and `release`.
27+
28+
- Build: `./gradlew assemble{Variant}`. Typically `assembleDemoDebug`.
29+
- Fix linting/formatting: `./gradlew --init-script gradle/init.gradle.kts spotlessApply`
30+
- Run local tests: `./gradlew {variant}Test`
31+
- Run single test: `./gradlew {variant}Test --tests "com.example.myapp.MyTestClass"`
32+
- Run local screenshot tests: `./gradlew verifyRoborazziDemoDebug`
33+
34+
### Instrumented tests
35+
36+
- Gradle-managed devices to run on device tests: `./gradlew pixel6api31aospDebugAndroidTest`. Also `pixel4api30aospatdDebugAndroidTest` and `pixelcapi30aospatdDebugAndroidTest`.
37+
38+
### Creating tests
39+
40+
#### Instrumented tests
41+
42+
- Tests for UI features should only use `ComposeTestRule` with a `ComponentActivity`.
43+
- Bigger tests live in the `:app` module and they can start activities like `MainActivity`.
44+
45+
#### Local tests
46+
47+
- [kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) for most assertions
48+
- [cashapp/turbine](https://github.com/cashapp/turbine) for complex coroutine tests
49+
- [google/truth](https://github.com/google/truth) for assertions
50+
51+
## Continuous integration
52+
53+
- The workflows are defined in `.github/workflows/*.yaml` and they contain various checks.
54+
- Screenshot tests are generated by CI, so they shouldn't be checked into the repo from a workstation.
55+
56+
## Version control and code location
57+
58+
- The project uses git and is hosted in https://github.com/android/nowinandroid.

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @dturner
Lines changed: 79 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,113 @@
11
androidx.activity:activity-compose:1.9.3
22
androidx.activity:activity-ktx:1.9.3
33
androidx.activity:activity:1.9.3
4-
androidx.annotation:annotation-experimental:1.4.1
4+
androidx.annotation:annotation-experimental:1.5.1
55
androidx.annotation:annotation-jvm:1.9.1
66
androidx.annotation:annotation:1.9.1
77
androidx.appcompat:appcompat-resources:1.7.0
88
androidx.arch.core:core-common:2.2.0
99
androidx.arch.core:core-runtime:2.2.0
1010
androidx.autofill:autofill:1.0.0
1111
androidx.browser:browser:1.8.0
12-
androidx.collection:collection-jvm:1.5.0-beta03
13-
androidx.collection:collection-ktx:1.5.0-beta03
14-
androidx.collection:collection:1.5.0-beta03
15-
androidx.compose.animation:animation-android:1.8.0-beta02
16-
androidx.compose.animation:animation-core-android:1.8.0-beta02
17-
androidx.compose.animation:animation-core:1.8.0-beta02
18-
androidx.compose.animation:animation:1.8.0-beta02
19-
androidx.compose.foundation:foundation-android:1.8.0-beta02
20-
androidx.compose.foundation:foundation-layout-android:1.8.0-beta02
21-
androidx.compose.foundation:foundation-layout:1.8.0-beta02
22-
androidx.compose.foundation:foundation:1.8.0-beta02
23-
androidx.compose.material3.adaptive:adaptive-android:1.1.0-rc01
24-
androidx.compose.material3.adaptive:adaptive:1.1.0-rc01
25-
androidx.compose.material3:material3-adaptive-navigation-suite-android:1.4.0-alpha08
26-
androidx.compose.material3:material3-adaptive-navigation-suite:1.4.0-alpha08
27-
androidx.compose.material3:material3-android:1.4.0-alpha08
28-
androidx.compose.material3:material3:1.4.0-alpha08
12+
androidx.collection:collection-jvm:1.5.0
13+
androidx.collection:collection-ktx:1.5.0
14+
androidx.collection:collection:1.5.0
15+
androidx.compose.animation:animation-android:1.10.0-alpha02
16+
androidx.compose.animation:animation-core-android:1.10.0-alpha02
17+
androidx.compose.animation:animation-core:1.10.0-alpha02
18+
androidx.compose.animation:animation:1.10.0-alpha02
19+
androidx.compose.foundation:foundation-android:1.10.0-alpha02
20+
androidx.compose.foundation:foundation-layout-android:1.10.0-alpha02
21+
androidx.compose.foundation:foundation-layout:1.10.0-alpha02
22+
androidx.compose.foundation:foundation:1.10.0-alpha02
23+
androidx.compose.material3.adaptive:adaptive-android:1.2.0-beta01
24+
androidx.compose.material3.adaptive:adaptive:1.2.0-beta01
25+
androidx.compose.material3:material3-adaptive-navigation-suite-android:1.5.0-alpha03
26+
androidx.compose.material3:material3-adaptive-navigation-suite:1.5.0-alpha03
27+
androidx.compose.material3:material3-android:1.5.0-alpha03
28+
androidx.compose.material3:material3:1.5.0-alpha03
2929
androidx.compose.material:material-icons-core-android:1.7.8
3030
androidx.compose.material:material-icons-core:1.7.8
3131
androidx.compose.material:material-icons-extended-android:1.7.8
3232
androidx.compose.material:material-icons-extended:1.7.8
33-
androidx.compose.material:material-ripple-android:1.8.0-beta02
34-
androidx.compose.material:material-ripple:1.8.0-beta02
35-
androidx.compose.runtime:runtime-android:1.8.0-beta02
36-
androidx.compose.runtime:runtime-saveable-android:1.8.0-beta02
37-
androidx.compose.runtime:runtime-saveable:1.8.0-beta02
38-
androidx.compose.runtime:runtime:1.8.0-beta02
39-
androidx.compose.ui:ui-android:1.8.0-beta02
40-
androidx.compose.ui:ui-geometry-android:1.8.0-beta02
41-
androidx.compose.ui:ui-geometry:1.8.0-beta02
42-
androidx.compose.ui:ui-graphics-android:1.8.0-beta02
43-
androidx.compose.ui:ui-graphics:1.8.0-beta02
44-
androidx.compose.ui:ui-text-android:1.8.0-beta02
45-
androidx.compose.ui:ui-text:1.8.0-beta02
46-
androidx.compose.ui:ui-tooling-preview-android:1.8.0-beta02
47-
androidx.compose.ui:ui-tooling-preview:1.8.0-beta02
48-
androidx.compose.ui:ui-unit-android:1.8.0-beta02
49-
androidx.compose.ui:ui-unit:1.8.0-beta02
50-
androidx.compose.ui:ui-util-android:1.8.0-beta02
51-
androidx.compose.ui:ui-util:1.8.0-beta02
52-
androidx.compose.ui:ui:1.8.0-beta02
53-
androidx.compose:compose-bom-alpha:2025.02.00
33+
androidx.compose.material:material-ripple-android:1.10.0-alpha02
34+
androidx.compose.material:material-ripple:1.10.0-alpha02
35+
androidx.compose.runtime:runtime-android:1.10.0-alpha02
36+
androidx.compose.runtime:runtime-annotation-android:1.10.0-alpha02
37+
androidx.compose.runtime:runtime-annotation:1.10.0-alpha02
38+
androidx.compose.runtime:runtime-saveable-android:1.10.0-alpha02
39+
androidx.compose.runtime:runtime-saveable:1.10.0-alpha02
40+
androidx.compose.runtime:runtime:1.10.0-alpha02
41+
androidx.compose.ui:ui-android:1.10.0-alpha02
42+
androidx.compose.ui:ui-geometry-android:1.10.0-alpha02
43+
androidx.compose.ui:ui-geometry:1.10.0-alpha02
44+
androidx.compose.ui:ui-graphics-android:1.10.0-alpha02
45+
androidx.compose.ui:ui-graphics:1.10.0-alpha02
46+
androidx.compose.ui:ui-text-android:1.10.0-alpha02
47+
androidx.compose.ui:ui-text:1.10.0-alpha02
48+
androidx.compose.ui:ui-tooling-preview-android:1.10.0-alpha02
49+
androidx.compose.ui:ui-tooling-preview:1.10.0-alpha02
50+
androidx.compose.ui:ui-unit-android:1.10.0-alpha02
51+
androidx.compose.ui:ui-unit:1.10.0-alpha02
52+
androidx.compose.ui:ui-util-android:1.10.0-alpha02
53+
androidx.compose.ui:ui-util:1.10.0-alpha02
54+
androidx.compose.ui:ui:1.10.0-alpha02
55+
androidx.compose:compose-bom-alpha:2025.08.01
5456
androidx.concurrent:concurrent-futures:1.1.0
55-
androidx.core:core-ktx:1.15.0
56-
androidx.core:core:1.15.0
57+
androidx.core:core-ktx:1.16.0
58+
androidx.core:core-viewtree:1.0.0
59+
androidx.core:core:1.16.0
5760
androidx.customview:customview-poolingcontainer:1.0.0
5861
androidx.customview:customview:1.0.0
62+
androidx.documentfile:documentfile:1.0.0
63+
androidx.dynamicanimation:dynamicanimation:1.0.0
5964
androidx.emoji2:emoji2:1.4.0
6065
androidx.exifinterface:exifinterface:1.3.7
6166
androidx.fragment:fragment:1.5.1
6267
androidx.graphics:graphics-path:1.0.1
6368
androidx.graphics:graphics-shapes-android:1.0.1
6469
androidx.graphics:graphics-shapes:1.0.1
6570
androidx.interpolator:interpolator:1.0.0
66-
androidx.lifecycle:lifecycle-common-java8:2.8.7
67-
androidx.lifecycle:lifecycle-common-jvm:2.8.7
68-
androidx.lifecycle:lifecycle-common:2.8.7
69-
androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.7
70-
androidx.lifecycle:lifecycle-livedata-core:2.8.7
71-
androidx.lifecycle:lifecycle-livedata:2.8.7
72-
androidx.lifecycle:lifecycle-process:2.8.7
73-
androidx.lifecycle:lifecycle-runtime-android:2.8.7
74-
androidx.lifecycle:lifecycle-runtime-compose-android:2.8.7
75-
androidx.lifecycle:lifecycle-runtime-compose:2.8.7
76-
androidx.lifecycle:lifecycle-runtime-ktx-android:2.8.7
77-
androidx.lifecycle:lifecycle-runtime-ktx:2.8.7
78-
androidx.lifecycle:lifecycle-runtime:2.8.7
79-
androidx.lifecycle:lifecycle-viewmodel-android:2.8.7
80-
androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7
81-
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.7
82-
androidx.lifecycle:lifecycle-viewmodel:2.8.7
71+
androidx.legacy:legacy-support-core-utils:1.0.0
72+
androidx.lifecycle:lifecycle-common-java8:2.10.0-alpha03
73+
androidx.lifecycle:lifecycle-common-jvm:2.10.0-alpha03
74+
androidx.lifecycle:lifecycle-common:2.10.0-alpha03
75+
androidx.lifecycle:lifecycle-livedata-core-ktx:2.10.0-alpha03
76+
androidx.lifecycle:lifecycle-livedata-core:2.10.0-alpha03
77+
androidx.lifecycle:lifecycle-livedata:2.10.0-alpha03
78+
androidx.lifecycle:lifecycle-process:2.10.0-alpha03
79+
androidx.lifecycle:lifecycle-runtime-android:2.10.0-alpha03
80+
androidx.lifecycle:lifecycle-runtime-compose-android:2.10.0-alpha03
81+
androidx.lifecycle:lifecycle-runtime-compose:2.10.0-alpha03
82+
androidx.lifecycle:lifecycle-runtime-ktx-android:2.10.0-alpha03
83+
androidx.lifecycle:lifecycle-runtime-ktx:2.10.0-alpha03
84+
androidx.lifecycle:lifecycle-runtime:2.10.0-alpha03
85+
androidx.lifecycle:lifecycle-viewmodel-android:2.10.0-alpha03
86+
androidx.lifecycle:lifecycle-viewmodel-ktx:2.10.0-alpha03
87+
androidx.lifecycle:lifecycle-viewmodel-savedstate-android:2.10.0-alpha03
88+
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.10.0-alpha03
89+
androidx.lifecycle:lifecycle-viewmodel:2.10.0-alpha03
8390
androidx.loader:loader:1.0.0
91+
androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
8492
androidx.metrics:metrics-performance:1.0.0-beta01
93+
androidx.print:print:1.0.0
8594
androidx.profileinstaller:profileinstaller:1.4.1
86-
androidx.savedstate:savedstate-ktx:1.2.1
87-
androidx.savedstate:savedstate:1.2.1
95+
androidx.savedstate:savedstate-android:1.4.0-alpha03
96+
androidx.savedstate:savedstate-compose-android:1.4.0-alpha03
97+
androidx.savedstate:savedstate-compose:1.4.0-alpha03
98+
androidx.savedstate:savedstate-ktx:1.4.0-alpha03
99+
androidx.savedstate:savedstate:1.4.0-alpha03
88100
androidx.startup:startup-runtime:1.1.1
89101
androidx.tracing:tracing-ktx:1.3.0-alpha02
90102
androidx.tracing:tracing:1.3.0-alpha02
103+
androidx.transition:transition:1.6.0
91104
androidx.vectordrawable:vectordrawable-animated:1.1.0
92105
androidx.vectordrawable:vectordrawable:1.1.0
93106
androidx.versionedparcelable:versionedparcelable:1.1.1
94107
androidx.viewpager:viewpager:1.0.0
95-
androidx.window.extensions.core:core:1.0.0
96-
androidx.window:window-core-android:1.3.0
97-
androidx.window:window-core:1.3.0
98-
androidx.window:window:1.3.0
108+
androidx.window:window-core-android:1.4.0
109+
androidx.window:window-core:1.4.0
110+
androidx.window:window:1.4.0
99111
com.google.accompanist:accompanist-drawablepainter:0.36.0
100112
com.google.code.findbugs:jsr305:3.0.2
101113
com.google.dagger:dagger-lint-aar:2.56
@@ -144,5 +156,8 @@ org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.10.1
144156
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1
145157
org.jetbrains.kotlinx:kotlinx-datetime-jvm:0.6.1
146158
org.jetbrains.kotlinx:kotlinx-datetime:0.6.1
159+
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.7.3
160+
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.7.3
161+
org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3
147162
org.jetbrains:annotations:23.0.0
148163
org.jspecify:jspecify:1.0.0

0 commit comments

Comments
 (0)