Skip to content

Commit

Permalink
android: Force me.relex:photodraweeview at v2.1.0
Browse files Browse the repository at this point in the history
The retired repo "jcenter" has been saying for years that it'll go
away, and that seems to have happened. Take this dependency at a
later version, which is available from Maven Central.

Fixes: zulip#5888
  • Loading branch information
chrisbobbe committed Sep 18, 2024
1 parent 35af31d commit 1485d82
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,6 @@ allprojects {

mavenCentral()
google()

// The retired "jcenter" repo.
// TODO: Get rid of this, when no deps use it.
jcenter() {
content {
// Allow jcenter for only me.relex:photodraweeview:1.1.3:
// https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:declaring-repository-filter
// Unfortunately, react-native-photo-view (which we want to
// stop using: #4217) still depends on this, and it's only
// available from jcenter.
// TODO(#4217): Remove this and the whole `jcenter()` block.
includeVersion("me.relex", "photodraweeview", "1.1.3")
}
}
}
}

Expand All @@ -85,6 +71,22 @@ subprojects {
}
}

subprojects {
afterEvaluate {
configurations.all {
// As of writing, and probably until this legacy codebase is retired,
// react-native-photo-view chooses version 1.1.3 of this dependency.
// That version was available from jcenter for a while -- see our commit 1f80f4b6c
// -- but doesn't seem to be anymore. Thankfully this newer version is available,
// from Maven Central. Force that version. Credit for the idea of this workaround:
// https://github.com/alwx/react-native-photo-view/issues/209#issuecomment-1158386189
resolutionStrategy {
force 'me.relex:photodraweeview:2.1.0'
}
}
}
}

// Force all our third-party dependencies to a sensible buildToolsVersion.
// What version should that be? It's whatever the Android plugin applied
// to our app project.
Expand Down

0 comments on commit 1485d82

Please sign in to comment.