Skip to content

Commit aa47552

Browse files
Merge pull request #39 from BTreeMap/copilot/fix-dependabot-alerts
Update transitive dependencies to address Dependabot alerts
2 parents 9a501ef + b320043 commit aa47552

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ cargo test
5555
- Override the native library path for tests with `LETTERBOX_CORE_LIB_PATH` or the `uniffi.component.letterbox_core.libraryOverride` system property (used by `RustFfiIntegrationTest`).
5656
- Gradle uses `gradle.properties` defaults (`org.gradle.jvmargs`, `android.useAndroidX`, Kotlin code style) and `gradle/libs.versions.toml` for dependency versions.
5757

58+
## Dependency overrides
59+
60+
- Gradle forces patched transitive versions in `build.gradle.kts` to satisfy Dependabot advisories without changing application source usage.
61+
- Overrides cover Android Gradle Plugin buildscript/runtime transitive artifacts (protobuf-java, jdom2, jose4j, commons-lang3, httpclient) and Netty modules when they appear in dependency graphs.
62+
- If any override causes incompatibilities, remove or adjust the specific entry and re-run `./gradlew buildEnvironment` or `./gradlew :app:dependencyInsight`.
63+
5864
## Testing
5965

6066
- Rust core: `cargo test`.

build.gradle.kts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@ plugins {
22
alias(libs.plugins.androidApplication) apply false
33
}
44

5+
val forcedDependencies = listOf(
6+
"com.google.protobuf:protobuf-java:4.33.4",
7+
"com.google.protobuf:protobuf-kotlin:4.33.4",
8+
"io.netty:netty-codec:4.2.9.Final",
9+
"io.netty:netty-codec-http:4.2.9.Final",
10+
"io.netty:netty-codec-http2:4.2.9.Final",
11+
"io.netty:netty-common:4.2.9.Final",
12+
"io.netty:netty-handler:4.2.9.Final",
13+
"org.bitbucket.b_c:jose4j:0.9.6",
14+
"org.jdom:jdom2:2.0.6.1",
15+
"org.apache.commons:commons-lang3:3.20.0",
16+
"org.apache.httpcomponents:httpclient:4.5.14",
17+
)
18+
19+
gradle.beforeProject {
20+
buildscript.configurations.configureEach {
21+
resolutionStrategy.force(*forcedDependencies.toTypedArray())
22+
}
23+
}
24+
25+
allprojects {
26+
configurations.configureEach {
27+
resolutionStrategy.force(*forcedDependencies.toTypedArray())
28+
}
29+
}
30+
531
tasks.register<Delete>("clean") {
632
delete(rootProject.layout.buildDirectory)
733
}

0 commit comments

Comments
 (0)