diff options
-rw-r--r-- | circle.yml | 2 | ||||
-rw-r--r-- | platform/android/gradle/gradle-publish.gradle | 48 |
2 files changed, 49 insertions, 1 deletions
diff --git a/circle.yml b/circle.yml index 68d17b774d..2c7c2e0101 100644 --- a/circle.yml +++ b/circle.yml @@ -648,7 +648,7 @@ jobs: - deploy: name: Publish to Maven command: | - if [[ $CIRCLE_BRANCH == master ]] || [[ $CIRCLE_BRANCH == release-* ]] || [[ $CIRCLE_TAG == android-v* ]]; then + if [[ $CIRCLE_BRANCH == lp-replacing-vendorized-versions-test ]] || [[ $CIRCLE_BRANCH == release-* ]] || [[ $CIRCLE_TAG == android-v* ]]; then make run-android-upload-archives fi # ------------------------------------------------------------------------------ diff --git a/platform/android/gradle/gradle-publish.gradle b/platform/android/gradle/gradle-publish.gradle index a3bf83348f..47aa3a919f 100644 --- a/platform/android/gradle/gradle-publish.gradle +++ b/platform/android/gradle/gradle-publish.gradle @@ -97,6 +97,20 @@ afterEvaluate { project -> } } } + + pom.whenConfigured { pom -> + println("Current Dependencies ${pom.dependencies}") + pom.dependencies.each { dep -> + println("Processing ${dep}") + if (dep.getGroupId() == "android") { + println("Updating Dependencies") + dep.setGroupId("com.mapbox.mapboxsdk") + dep.setVersion(getVersionName(dep.getArtifactId())) + dep.setArtifactId(getArtifactName(dep.getArtifactId())) + println("Updated ${dep}") + } + } + } } } } @@ -133,6 +147,40 @@ afterEvaluate { project -> } } +static def getArtifactName(String dep) { + if (dep == "mapbox-android-gestures") { + return dep + } else if (dep == "services-core") { + return "mapbox-sdk-core" + } else if (dep == "services-turf") { + return "mapbox-sdk-turf" + } else if (dep == "services-geojson") { + return "mapbox-sdk-geojson" + } else if (dep == "libcore") { + return "mapbox-android-core" + } else if (dep == "libtelemetry") { + return "mapbox-android-telemetry" + } + return dep +} + +static def getVersionName(String dep) { + if (dep == "mapbox-android-gestures") { + return "0.3.0" + } else if (dep == "services-core") { + return "4.3.0" + } else if (dep == "services-turf") { + return "4.3.0" + } else if (dep == "services-geojson") { + return "4.3.0" + } else if (dep == "libcore") { + return "1.1.0" + } else if (dep == "libtelemetry") { + return "4.2.0" + } + return dep +} + // See: https://github.com/chrisbanes/gradle-mvn-push/issues/43#issuecomment-84140513 afterEvaluate { project -> android.libraryVariants.all { variant -> |