-
-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Gradle dependencies to Gradle version catalog (#2229)
- Loading branch information
Showing
9 changed files
with
135 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.gradle/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,17 @@ | ||
apply from: "${rootDir}/gradle/dependencies.gradle" | ||
|
||
//def MAPBOX_JAVA_DIR = 'maplibre-java' | ||
//def MAPBOX_JAVA_TAG_PREFIX = 'v' | ||
|
||
def MAPBOX_GESTURES_DIR = 'mapbox-gestures-android' | ||
def MAPBOX_GESTURES_TAG_PREFIX = 'v' | ||
|
||
task androidNitpick { | ||
doLast { | ||
println "Running android nitpick script" | ||
|
||
println "Verify vendor submodule pins" | ||
// Will enter a task to re-evaluate and restore if needed verifyVendorSubmodulePin(MAPBOX_JAVA_DIR, MAPBOX_JAVA_TAG_PREFIX, versions.mapLibreServices) | ||
verifyVendorSubmodulePin(MAPBOX_GESTURES_DIR, MAPBOX_GESTURES_TAG_PREFIX, versions.mapboxGestures) | ||
|
||
verifyLicenseGeneration() | ||
} | ||
} | ||
|
||
private def verifyVendorSubmodulePin(def dir, def prefix, def version) { | ||
println "Verify vendor submodule pin: ${dir} (${prefix + version})" | ||
exec { | ||
workingDir = "${rootDir}/vendor/${dir}" | ||
commandLine "git", "fetch", "-t" | ||
} | ||
|
||
def output = new ByteArrayOutputStream() | ||
exec { | ||
workingDir = "${rootDir}/vendor/${dir}" | ||
commandLine "git", "rev-list", "-n", "1", "tags/${prefix + version}" | ||
standardOutput = output | ||
} | ||
def expectedCommit = output.toString().trim() | ||
output.reset() | ||
|
||
exec { | ||
workingDir = "${rootDir}/vendor/${dir}" | ||
commandLine "git", "rev-parse", "HEAD" | ||
standardOutput = output | ||
} | ||
def actualCommit = output.toString().trim() | ||
|
||
if (actualCommit != expectedCommit) { | ||
throw new IllegalStateException("${dir} vendor repository is not checked out on the consumed binary's tag.\n" + | ||
"Expected commit: " + expectedCommit + "(${prefix + version} tag).\n" + | ||
"Actual commit: " + actualCommit + ".\n" + | ||
"If you've updated the version in the dependencies.gradle file, make sure to bump the submodule pin in the /vendor directory to match the release tag.\n" + | ||
"If you've bumped the pin, make sure to verify the version tag prefix in the android-nitpick.gradle file.") | ||
} | ||
output.close() | ||
} | ||
|
||
private def verifyLicenseGeneration() { | ||
println "Verify license generation with git diff..." | ||
exec { | ||
workingDir = "${rootDir}" | ||
commandLine "python", "scripts/validate-license.py" | ||
commandLine "python3", "scripts/validate-license.py" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
[versions] | ||
mapLibreServices = "5.9.0" | ||
mapboxGestures = "0.7.0" | ||
appCompat = "1.5.1" | ||
constraintLayout = "2.1.4" | ||
interpolator = "1.0.0" | ||
recyclerView = "1.2.1" | ||
material = "1.7.0" | ||
uiAutomator = "2.2.0" | ||
espresso = "3.5.0" | ||
testRunner = "1.1.4" | ||
testRules = "1.5.0" | ||
fragment = "1.5.5" | ||
annotation = "1.5.0" | ||
leakCanary = "2.10" | ||
junit = "4.13.2" | ||
mockito = "4.10.0" | ||
mockk = "1.13.3" | ||
robolectric = "4.9.1" | ||
timber = "5.0.1" | ||
okhttp = "4.11.0" | ||
kotlin = "1.9.21" | ||
licenses = "0.8.80" | ||
lint = "30.3.1" | ||
appcenter = "1.5" | ||
commonsIO = "2.11.0" | ||
assertj = "3.23.1" | ||
gradleNexus = "1.1.0" | ||
multidex = "2.0.1" | ||
|
||
androidxTestExtJUnit = "1.1.5" | ||
androidxTestCoreKtx = "1.5.0" | ||
kotlinxSerializationJson = "1.6.0" | ||
|
||
|
||
[libraries] | ||
maplibreJavaGeoJSON = { group = "org.maplibre.gl", name = "android-sdk-geojson", version.ref = "mapLibreServices" } | ||
mapboxAndroidGestures = { group = "com.mapbox.mapboxsdk", name = "mapbox-android-gestures", version.ref = "mapboxGestures" } | ||
maplibreJavaTurf = { group = "org.maplibre.gl", name = "android-sdk-turf", version.ref = "mapLibreServices" } | ||
|
||
junit = { group = "junit", name = "junit", version.ref = "junit" } | ||
amdroidxJunit = { group = "androidx.test.ext", name = "junit", version.ref = "testRunner" } | ||
mockito = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" } | ||
mockk = { group = "io.mockk", name = "mockk", version.ref = "mockk" } | ||
robolectric = { group = "org.robolectric", name = "robolectric", version.ref = "robolectric" } | ||
assertjcore = { group = "org.assertj", name = "assertj-core", version.ref = "assertj" } | ||
|
||
testRunner = { group = "androidx.test.ext", name = "junit", version.ref = "testRunner" } | ||
testRules = { group = "androidx.test", name = "rules", version.ref = "testRules" } | ||
testEspressoCore = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso" } | ||
testEspressoIntents = { group = "androidx.test.espresso", name = "espresso-intents", version.ref = "espresso" } | ||
testEspressoContrib = { group = "androidx.test.espresso", name = "espresso-contrib", version.ref = "espresso" } | ||
testUiAutomator = { group = "androidx.test.uiautomator", name = "uiautomator", version.ref = "uiAutomator" } | ||
supportAnnotations = { group = "androidx.annotation", name = "annotation", version.ref = "annotation" } | ||
supportAppcompatV7 = { group = "androidx.appcompat", name = "appcompat", version.ref = "appCompat" } | ||
supportFragmentV4 = { group = "androidx.fragment", name = "fragment", version.ref = "fragment" } | ||
supportRecyclerView = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "recyclerView" } | ||
supportConstraintLayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintLayout" } | ||
interpolator = { group = "androidx.interpolator", name = "interpolator", version.ref = "interpolator" } | ||
supportDesign = { group = "com.google.android.material", name = "material", version.ref = "material" } | ||
multidex = { group = "androidx.multidex", name = "multidex", version.ref = "multidex" } | ||
|
||
appCenter = { group = "com.microsoft.appcenter", name = "espresso-test-extension", version.ref = "appcenter" } | ||
commonsIO = { group = "commons-io", name = "commons-io", version.ref = "commonsIO" } | ||
timber = { group = "com.jakewharton.timber", name = "timber", version.ref = "timber" } | ||
okhttp3 = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" } | ||
leakCanary = { group = "com.squareup.leakcanary", name = "leakcanary-android", version.ref = "leakCanary" } | ||
|
||
kotlinPlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" } | ||
licensesPlugin = { group = "com.jaredsburrows", name = "gradle-license-plugin", version.ref = "licenses" } | ||
|
||
lint = { group = "com.android.tools.lint", name = "lint", version.ref = "lint" } | ||
lintApi = { group = "com.android.tools.lint", name = "lint-api", version.ref = "lint" } | ||
lintChecks = { group = "com.android.tools.lint", name = "lint-checks", version.ref = "lint" } | ||
lintTests = { group = "com.android.tools.lint", name = "lint-tests", version.ref = "lint" } | ||
|
||
gradleNexus = { group = "io.github.gradle-nexus", name = "publish-plugin", version.ref = "gradleNexus" } | ||
|
||
androidxTestExtJUnit = { group = "androidx.test.ext", name = "junit", version = "1.1.5" } | ||
androidxTestCoreKtx = { group = "androidx.test", name = "core-ktx", version = "1.5.0" } | ||
kotlinxSerializationJson = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version = "1.6.0" } | ||
|
||
[plugins] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.gradle/ |