Skip to content

Commit 9ad6192

Browse files
authored
feat : bump Cronet to 143.7445.0 (#125)
1 parent 3f8a53a commit 9ad6192

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

docs/cronet-android.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ Android uses Google's **embedded Cronet** through the Java `CronetEngine` API, c
1010
api "org.chromium.net:cronet-embedded:${cronetVersion}"
1111
```
1212

13-
`cronetVersion` defaults to `141.7340.3` and can be overridden with a `NitroFetch_cronetVersion` gradle property. The embedded variant bundles the native Chromium net stack, so no Play Services dependency is required.
13+
`cronetVersion` defaults to `143.7445.0` and can be overridden with a `NitroFetch_cronetVersion` gradle property. The embedded variant bundles the native Chromium net stack, so no Play Services dependency is required.
14+
15+
> **Note:** `143.7445.0` is the minimum version required to build with Android Gradle Plugin 9+. Earlier Cronet artifacts shared the `org.chromium.net` namespace across modules, which trips AGP 9's unique-namespace enforcement during manifest merge. Fixed upstream in [crbug 406926302](https://issues.chromium.org/issues/406926302).
1416
1517
## Engine
1618

example/android/app/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ dependencies {
124124
}
125125

126126
// Add Cronet Java implementation so CronetEngine.Builder() can find a provider.
127-
// Keep version aligned with the libcronet you package.
128-
def cronetVersion = project.rootProject.findProperty("NitroFetch_cronetVersion") ?: "119.6045.31"
127+
// Keep version aligned with the libcronet you package (see
128+
// packages/react-native-nitro-fetch/android/build.gradle). 143.7445.0+ is
129+
// required for AGP 9 (unique namespaces) — https://issues.chromium.org/issues/406926302
130+
def cronetVersion = project.rootProject.findProperty("NitroFetch_cronetVersion") ?: "143.7445.0"
129131
implementation("org.chromium.net:cronet-embedded:${cronetVersion}")
130132
}

packages/react-native-nitro-fetch/android/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ repositories {
125125

126126
def kotlin_version = getExtOrDefault("kotlinVersion")
127127
// ---------- Cronet (Java API only) ----------
128-
def cronetVersion = (getExtOrDefault("cronetVersion") ?: "141.7340.3")
128+
// Pinned to 143.7445.0+: earlier Cronet artifacts shared the `org.chromium.net`
129+
// namespace across modules (cronet-embedded/common/api/shared/...), which fails
130+
// the AGP 9 unique-namespace check during manifest merge. Fixed upstream in
131+
// https://issues.chromium.org/issues/406926302
132+
def cronetVersion = (getExtOrDefault("cronetVersion") ?: "143.7445.0")
129133

130134

131135
dependencies {

0 commit comments

Comments
 (0)