From cab749aee310c9138319f04727e7d3bf766bebaa Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 23 Mar 2021 11:02:59 +0800 Subject: [PATCH 1/4] Add sdk-registry config --- Makefile | 13 +- build.gradle | 14 +- gradle/artifact-settings.gradle | 15 ++ gradle/dependencies.gradle | 8 +- gradle/publish.gradle | 168 +++++++++-------------- gradle/wrapper/gradle-wrapper.properties | 4 +- ktx-mapbox-maps/build.gradle | 2 +- ktx-mapbox-maps/gradle.properties | 3 +- plugin-annotation/build.gradle | 2 +- plugin-annotation/gradle.properties | 3 +- plugin-building/gradle.properties | 3 +- plugin-localization/build.gradle | 2 +- plugin-localization/gradle.properties | 3 +- plugin-markerview/build.gradle | 2 +- plugin-markerview/gradle.properties | 3 +- plugin-offline/build.gradle | 2 +- plugin-offline/gradle.properties | 5 +- plugin-places/build.gradle | 2 +- plugin-places/gradle.properties | 3 +- plugin-scalebar/build.gradle | 2 +- plugin-scalebar/gradle.properties | 3 +- plugin-traffic/build.gradle | 2 +- plugin-traffic/gradle.properties | 3 +- 23 files changed, 128 insertions(+), 139 deletions(-) create mode 100644 gradle/artifact-settings.gradle diff --git a/Makefile b/Makefile index 6d00ca34b..4948921a8 100644 --- a/Makefile +++ b/Makefile @@ -23,12 +23,9 @@ javadoc: # Output is ./mapbox/*/build/docs/javadoc/release ./gradlew javadocrelease +# Uploads the compiled Android SDK to Mapbox SDK Registry publish: - export IS_LOCAL_DEVELOPMENT=false; ./gradlew uploadArchives - -publish-local: - # This publishes to ~/.m2/repository/com/mapbox/mapboxsdk - export IS_LOCAL_DEVELOPMENT=true; ./gradlew uploadArchives + export ./gradlew mapboxSDKRegistryUpload generate-sanity-test: npm install && node scripts/generate-activity-test.js @@ -54,11 +51,7 @@ javadoc-$1: ./gradlew :$2:javadocrelease publish-$1: - export IS_LOCAL_DEVELOPMENT=false; ./gradlew :$2:uploadArchives - -publish-local-$1: - # This publishes to ~/.m2/repository/com/mapbox/mapboxsdk - export IS_LOCAL_DEVELOPMENT=true; ./gradlew :$2:uploadArchives + export./gradlew :$2:mapboxSDKRegistryUpload endef diff --git a/build.gradle b/build.gradle index 810b75cb7..410ebe3f6 100644 --- a/build.gradle +++ b/build.gradle @@ -6,9 +6,21 @@ buildscript { jcenter() maven { url "https://maven.google.com" } maven { url "https://plugins.gradle.org/m2/" } + maven { + url 'https://api.mapbox.com/downloads/v2/releases/maven' + authentication { + basic(BasicAuthentication) + } + credentials { + username "mapbox" + password = project.hasProperty('SDK_REGISTRY_TOKEN') ? project.property('SDK_REGISTRY_TOKEN') : System.getenv('SDK_REGISTRY_TOKEN') + } + } } dependencies { + classpath pluginDependencies.mapboxSdkRegistryPlugin + classpath pluginDependencies.androidPublish classpath pluginDependencies.gradle classpath pluginDependencies.kotlin classpath pluginDependencies.kotlinLint @@ -42,4 +54,4 @@ subprojects { task clean(type: Delete) { delete rootProject.buildDir -} \ No newline at end of file +} diff --git a/gradle/artifact-settings.gradle b/gradle/artifact-settings.gradle new file mode 100644 index 000000000..be224eb5c --- /dev/null +++ b/gradle/artifact-settings.gradle @@ -0,0 +1,15 @@ +ext { + mapboxArtifactGroupId = project.property('POM_GROUP_ID') + mapboxArtifactId = project.property('POM_ARTIFACT_ID') + mapboxArtifactTitle = project.property('POM_NAME') + mapboxArtifactDescription = project.property('POM_DESCRIPTION') + mapboxDeveloperName = 'Mapbox' + mapboxDeveloperId = 'mapbox' + mapboxArtifactUrl = 'https://github.com/mapbox/mapbox-plugins-android' + mapboxArtifactVcsUrl = 'git@github.com:mapbox/mapbox-plugins-android.git' + mapboxArtifactScmUrl = 'scm:git@github.com:mapbox/mapbox-plugins-android.git' + mapboxArtifactLicenseName = 'BSD' + mapboxArtifactLicenseUrl = 'https://opensource.org/licenses/BSD-2-Clause' + versionName = project.property('VERSION_NAME') + mapboxRegistrySdkName = project.hasProperty('REGISTRY_SDK_NAME') ? project.property('REGISTRY_SDK_NAME') : System.getenv('REGISTRY_SDK_NAME') +} diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index c01ca0497..2d6817645 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -35,7 +35,9 @@ gradle : '3.4.0', kotlin : '1.3.50', dokka : '0.9.17', - kotlinLint: '8.1.0' + kotlinLint: '8.1.0', + mapboxSdkRegistryPlugin: '0.4.0', + pluginMavenPublish: "3.6.2" ] dependenciesList = [ @@ -98,6 +100,8 @@ checkstyle: "com.puppycrawl.tools:checkstyle:${pluginVersion.checkstyle}", kotlin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${pluginVersion.kotlin}", dokka : "org.jetbrains.dokka:dokka-android-gradle-plugin:${pluginVersion.dokka}", - kotlinLint: "org.jlleitschuh.gradle:ktlint-gradle:${pluginVersion.kotlinLint}" + kotlinLint: "org.jlleitschuh.gradle:ktlint-gradle:${pluginVersion.kotlinLint}", + mapboxSdkRegistryPlugin: "com.mapbox.gradle.plugins:sdk-registry:${pluginVersion.mapboxSdkRegistryPlugin}", + androidPublish: "digital.wup:android-maven-publish:${pluginVersion.pluginMavenPublish}" ] } diff --git a/gradle/publish.gradle b/gradle/publish.gradle index 9dd7e36f3..93b0939cb 100644 --- a/gradle/publish.gradle +++ b/gradle/publish.gradle @@ -1,123 +1,79 @@ -apply plugin: 'maven' -apply plugin: 'signing' - -def isReleaseBuild() { - return VERSION_NAME.contains("SNAPSHOT") == false -} - -static def isLocalBuild() { - if (System.getenv('IS_LOCAL_DEVELOPMENT') != null) { - return System.getenv('IS_LOCAL_DEVELOPMENT').toBoolean() - } - return true -} - -def getReleaseRepositoryUrl() { - return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL - : "https://oss.sonatype.org/service/local/staging/deploy/maven2/" -} - -def getSnapshotRepositoryUrl() { - return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL - : "https://oss.sonatype.org/content/repositories/snapshots/" -} - -def obtainMavenLocalUrl() { - return getRepositories().mavenLocal().getUrl() -} - -def getRepositoryUsername() { - return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "" -} - -def getRepositoryPassword() { - return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "" -} - -afterEvaluate { project -> - uploadArchives { - repositories { - mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - - pom.groupId = GROUP - pom.artifactId = POM_ARTIFACT_ID - pom.version = VERSION_NAME - - if (isLocalBuild()) { - repository(url: obtainMavenLocalUrl()) - } else { - repository(url: getReleaseRepositoryUrl()) { - authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) - } - snapshotRepository(url: getSnapshotRepositoryUrl()) { - authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) - } - } - - pom.project { - name POM_NAME - packaging POM_PACKAGING - description POM_DESCRIPTION - url POM_URL - - scm { - url POM_SCM_URL - connection POM_SCM_CONNECTION - developerConnection POM_SCM_DEV_CONNECTION - } - - licenses { - license { - name POM_LICENCE_NAME - url POM_LICENCE_URL - distribution POM_LICENCE_DIST +apply plugin: 'digital.wup.android-maven-publish' +apply plugin: 'maven-publish' +apply plugin: 'com.mapbox.sdkRegistry' +apply from: file('../gradle/artifact-settings.gradle') + +version = project.ext.versionName +group = project.ext.mapboxArtifactGroupId + +publishing { + publications { + ModularMapboxMapsSdkRegistryPublication(MavenPublication) { + from components.android + groupId this.group + artifactId project.ext.mapboxArtifactId + version this.version + afterEvaluate { + artifact(androidSourcesJar) + artifact(androidJavadocsJar) } - } - developers { - developer { - id POM_DEVELOPER_ID - name POM_DEVELOPER_NAME + pom.withXml { + final mainNode = asNode() + mainNode.appendNode('name', project.ext.mapboxArtifactTitle) + mainNode.appendNode('description', project.ext.mapboxArtifactTitle) + mainNode.appendNode('url', project.ext.mapboxArtifactUrl) + + final licenseNode = mainNode.appendNode('licenses').appendNode('license') + licenseNode.appendNode('name', project.ext.mapboxArtifactLicenseName) + licenseNode.appendNode('url', project.ext.mapboxArtifactLicenseUrl) + licenseNode.appendNode('distribution', "repo") + + final developerNode = mainNode.appendNode('developers').appendNode('developer') + developerNode.appendNode('id', project.ext.mapboxDeveloperId) + developerNode.appendNode('name', project.ext.mapboxDeveloperName) + + final scmNode = mainNode.appendNode("scm") + scmNode.appendNode("connection", project.ext.mapboxArtifactScmUrl) + scmNode.appendNode("developerConnection", project.ext.mapboxArtifactScmUrl) + scmNode.appendNode("url", project.ext.mapboxArtifactUrl) } - } } - } } - } +} - signing { - required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") } - sign configurations.archives - } +registry { + sdkName = project.ext.mapboxRegistrySdkName + override = project.ext.versionName.endsWith("-SNAPSHOT") + dryRun = false + publish = true + snapshot = project.ext.versionName.endsWith("-SNAPSHOT") + publishMessage = "cc @mapbox/maps-android" + publications = ["ModularMapboxMapsSdkRegistryPublication"] +} - task androidJavadocs(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) - } +task androidJavadocs(type: Javadoc) { + source = android.sourceSets.main.java.sourceFiles + classpath = files(android.bootClasspath) + failOnError = false +} - task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { - classifier = 'dokka' +task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { + classifier = 'javadoc' from androidJavadocs.destinationDir - } +} - task androidSourcesJar(type: Jar) { +task androidSourcesJar(type: Jar) { classifier = 'sources' from android.sourceSets.main.java.sourceFiles - } - - artifacts { - archives androidSourcesJar - archives androidJavadocsJar - } } // See: https://github.com/chrisbanes/gradle-mvn-push/issues/43#issuecomment-84140513 afterEvaluate { project -> - android.libraryVariants.all { variant -> - tasks.androidJavadocs.doFirst { - classpath += files(variant.javaCompile.classpath.files) - classpath += configurations.javadocDeps + android.libraryVariants.all { variant -> + tasks.androidJavadocs.doFirst { + classpath += files(variant.javaCompile.classpath.files) + classpath += configurations.javadocDeps + } } - } -} \ No newline at end of file +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6e6489cf0..7b329a58d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Apr 29 20:21:20 CEST 2019 +#Mon Mar 22 20:37:29 CST 2021 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip diff --git a/ktx-mapbox-maps/build.gradle b/ktx-mapbox-maps/build.gradle index abb791cb6..992be5576 100644 --- a/ktx-mapbox-maps/build.gradle +++ b/ktx-mapbox-maps/build.gradle @@ -39,4 +39,4 @@ dependencies { apply from: "${rootDir}/gradle/javadoc.gradle" apply from: "${rootDir}/gradle/publish.gradle" -apply from: "${rootDir}/gradle/checkstyle.gradle" \ No newline at end of file +apply from: "${rootDir}/gradle/checkstyle.gradle" diff --git a/ktx-mapbox-maps/gradle.properties b/ktx-mapbox-maps/gradle.properties index e1846fd1a..a8ded9984 100644 --- a/ktx-mapbox-maps/gradle.properties +++ b/ktx-mapbox-maps/gradle.properties @@ -2,4 +2,5 @@ VERSION_NAME=0.1.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-sdk-ktx-v7 POM_NAME=Mapbox Maps SDK for Android KTX POM_DESCRIPTION=A set of Kotlin extensions for the Mapbox Maps SDK for Android. -POM_PACKAGING=aar \ No newline at end of file +POM_GROUP_ID=com.mapbox.mapboxsdk +REGISTRY_SDK_NAME=mapbox-android-ktx diff --git a/plugin-annotation/build.gradle b/plugin-annotation/build.gradle index c1d70124c..78f012bcf 100644 --- a/plugin-annotation/build.gradle +++ b/plugin-annotation/build.gradle @@ -34,4 +34,4 @@ dependencies { apply from: "${rootDir}/gradle/javadoc.gradle" apply from: "${rootDir}/gradle/publish.gradle" apply from: "${rootDir}/gradle/checkstyle.gradle" -apply from: "${rootDir}/gradle/nitpick.gradle" \ No newline at end of file +apply from: "${rootDir}/gradle/nitpick.gradle" diff --git a/plugin-annotation/gradle.properties b/plugin-annotation/gradle.properties index 90c95766d..a2a90d9a7 100644 --- a/plugin-annotation/gradle.properties +++ b/plugin-annotation/gradle.properties @@ -2,4 +2,5 @@ VERSION_NAME=0.10.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-annotation-v9 POM_NAME=Mapbox Android Annotation Plugin POM_DESCRIPTION=Mapbox Android Annotation Plugin -POM_PACKAGING=aar \ No newline at end of file +POM_GROUP_ID=com.mapbox.mapboxsdk +REGISTRY_SDK_NAME=mapbox-android-annotation diff --git a/plugin-building/gradle.properties b/plugin-building/gradle.properties index 16a520e94..1ff04ca2a 100644 --- a/plugin-building/gradle.properties +++ b/plugin-building/gradle.properties @@ -2,4 +2,5 @@ VERSION_NAME=0.8.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-building-v9 POM_NAME=Mapbox Android Building Plugin POM_DESCRIPTION=Mapbox Android Building Plugin -POM_PACKAGING=aar \ No newline at end of file +POM_GROUP_ID=com.mapbox.mapboxsdk +REGISTRY_SDK_NAME=mapbox-android-building diff --git a/plugin-localization/build.gradle b/plugin-localization/build.gradle index 2955b4f34..d01c3a1b3 100644 --- a/plugin-localization/build.gradle +++ b/plugin-localization/build.gradle @@ -31,4 +31,4 @@ dependencies { apply from: "${rootDir}/gradle/javadoc.gradle" apply from: "${rootDir}/gradle/publish.gradle" -apply from: "${rootDir}/gradle/checkstyle.gradle" \ No newline at end of file +apply from: "${rootDir}/gradle/checkstyle.gradle" diff --git a/plugin-localization/gradle.properties b/plugin-localization/gradle.properties index 2ea3a8382..4a51c2d21 100644 --- a/plugin-localization/gradle.properties +++ b/plugin-localization/gradle.properties @@ -2,5 +2,6 @@ VERSION_NAME=0.13.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-localization-v9 POM_NAME=Mapbox Android Localization Plugin POM_DESCRIPTION=Mapbox Android Localization Plugin -POM_PACKAGING=aar +POM_GROUP_ID=com.mapbox.mapboxsdk +REGISTRY_SDK_NAME=mapbox-android-localization diff --git a/plugin-markerview/build.gradle b/plugin-markerview/build.gradle index 8ccfa5c5a..c46fd2374 100644 --- a/plugin-markerview/build.gradle +++ b/plugin-markerview/build.gradle @@ -32,4 +32,4 @@ dependencies { apply from: "${rootDir}/gradle/javadoc.gradle" apply from: "${rootDir}/gradle/publish.gradle" -apply from: "${rootDir}/gradle/checkstyle.gradle" \ No newline at end of file +apply from: "${rootDir}/gradle/checkstyle.gradle" diff --git a/plugin-markerview/gradle.properties b/plugin-markerview/gradle.properties index fcd9773ca..5950ce1dc 100644 --- a/plugin-markerview/gradle.properties +++ b/plugin-markerview/gradle.properties @@ -2,4 +2,5 @@ VERSION_NAME=0.5.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-markerview-v9 POM_NAME=Mapbox Android MarkerView Plugin POM_DESCRIPTION=Mapbox Android MarkerView Plugin -POM_PACKAGING=aar \ No newline at end of file +POM_GROUP_ID=com.mapbox.mapboxsdk +REGISTRY_SDK_NAME=mapbox-android-markerview diff --git a/plugin-offline/build.gradle b/plugin-offline/build.gradle index 6c7012ba1..04f9c9b4c 100644 --- a/plugin-offline/build.gradle +++ b/plugin-offline/build.gradle @@ -50,4 +50,4 @@ dependencies { apply from: "${rootDir}/gradle/javadoc.gradle" apply from: "${rootDir}/gradle/publish.gradle" -apply from: "${rootDir}/gradle/checkstyle.gradle" \ No newline at end of file +apply from: "${rootDir}/gradle/checkstyle.gradle" diff --git a/plugin-offline/gradle.properties b/plugin-offline/gradle.properties index acc59a9d5..764481a46 100644 --- a/plugin-offline/gradle.properties +++ b/plugin-offline/gradle.properties @@ -1,5 +1,6 @@ -VERSION_NAME=0.8.0-SNAPSHOT +VERSION_NAME=0.8.0 +POM_GROUP_ID=com.mapbox.mapboxsdk POM_ARTIFACT_ID=mapbox-android-plugin-offline-v9 POM_NAME=Mapbox Android Offline Plugin POM_DESCRIPTION=Mapbox Android Offline Plugin -POM_PACKAGING=aar \ No newline at end of file +REGISTRY_SDK_NAME=mapbox-android-offline diff --git a/plugin-places/build.gradle b/plugin-places/build.gradle index 62ebdef53..8c338ed99 100644 --- a/plugin-places/build.gradle +++ b/plugin-places/build.gradle @@ -76,4 +76,4 @@ dependencies { apply from: "${rootDir}/gradle/javadoc.gradle" apply from: "${rootDir}/gradle/publish.gradle" -apply from: "${rootDir}/gradle/checkstyle.gradle" \ No newline at end of file +apply from: "${rootDir}/gradle/checkstyle.gradle" diff --git a/plugin-places/gradle.properties b/plugin-places/gradle.properties index d8a782261..e62ada617 100644 --- a/plugin-places/gradle.properties +++ b/plugin-places/gradle.properties @@ -2,4 +2,5 @@ VERSION_NAME=0.13.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-places-v9 POM_NAME=Mapbox Android Places Plugin POM_DESCRIPTION=Mapbox Android Places Plugin -POM_PACKAGING=aar \ No newline at end of file +POM_GROUP_ID=com.mapbox.mapboxsdk +REGISTRY_SDK_NAME=mapbox-android-places diff --git a/plugin-scalebar/build.gradle b/plugin-scalebar/build.gradle index 64dc5fc15..dd454b29f 100644 --- a/plugin-scalebar/build.gradle +++ b/plugin-scalebar/build.gradle @@ -33,4 +33,4 @@ dependencies { apply from: "${rootDir}/gradle/javadoc.gradle" apply from: "${rootDir}/gradle/publish.gradle" -apply from: "${rootDir}/gradle/checkstyle.gradle" \ No newline at end of file +apply from: "${rootDir}/gradle/checkstyle.gradle" diff --git a/plugin-scalebar/gradle.properties b/plugin-scalebar/gradle.properties index 0a51d01b0..c69d7fba9 100644 --- a/plugin-scalebar/gradle.properties +++ b/plugin-scalebar/gradle.properties @@ -2,4 +2,5 @@ VERSION_NAME=0.6.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-scalebar-v9 POM_NAME=Mapbox Android Scalebar Plugin POM_DESCRIPTION=Mapbox Android Scalebar Plugin -POM_PACKAGING=aar \ No newline at end of file +POM_GROUP_ID=com.mapbox.mapboxsdk +REGISTRY_SDK_NAME=mapbox-android-scalebar diff --git a/plugin-traffic/build.gradle b/plugin-traffic/build.gradle index 391821cfc..3b85bd014 100644 --- a/plugin-traffic/build.gradle +++ b/plugin-traffic/build.gradle @@ -32,4 +32,4 @@ dependencies { apply from: "${rootDir}/gradle/javadoc.gradle" apply from: "${rootDir}/gradle/publish.gradle" -apply from: "${rootDir}/gradle/checkstyle.gradle" \ No newline at end of file +apply from: "${rootDir}/gradle/checkstyle.gradle" diff --git a/plugin-traffic/gradle.properties b/plugin-traffic/gradle.properties index e75308747..0629cb84f 100644 --- a/plugin-traffic/gradle.properties +++ b/plugin-traffic/gradle.properties @@ -2,4 +2,5 @@ VERSION_NAME=0.11.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-traffic-v9 POM_NAME=Mapbox Android Traffic Plugin POM_DESCRIPTION=Mapbox Android Traffic Plugin -POM_PACKAGING=aar \ No newline at end of file +POM_GROUP_ID=com.mapbox.mapboxsdk +REGISTRY_SDK_NAME=mapbox-android-traffic From 92385bbba74e29f7ad02d828c36da4fd594430b5 Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 23 Mar 2021 18:11:37 +0800 Subject: [PATCH 2/4] Update config --- Makefile | 4 ++-- gradle/artifact-settings.gradle | 2 +- gradle/publish.gradle | 2 +- ktx-mapbox-maps/gradle.properties | 1 - plugin-annotation/gradle.properties | 3 +-- plugin-building/gradle.properties | 3 +-- plugin-localization/gradle.properties | 3 +-- plugin-markerview/gradle.properties | 3 +-- plugin-offline/gradle.properties | 4 ++-- plugin-places/gradle.properties | 3 +-- plugin-scalebar/gradle.properties | 3 +-- plugin-traffic/gradle.properties | 3 +-- 12 files changed, 13 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 4948921a8..ee399c8b7 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ javadoc: # Uploads the compiled Android SDK to Mapbox SDK Registry publish: - export ./gradlew mapboxSDKRegistryUpload + ./gradlew mapboxSDKRegistryUpload generate-sanity-test: npm install && node scripts/generate-activity-test.js @@ -51,7 +51,7 @@ javadoc-$1: ./gradlew :$2:javadocrelease publish-$1: - export./gradlew :$2:mapboxSDKRegistryUpload + ./gradlew :$2:mapboxSDKRegistryUpload endef diff --git a/gradle/artifact-settings.gradle b/gradle/artifact-settings.gradle index be224eb5c..c2fb035ab 100644 --- a/gradle/artifact-settings.gradle +++ b/gradle/artifact-settings.gradle @@ -1,5 +1,5 @@ ext { - mapboxArtifactGroupId = project.property('POM_GROUP_ID') + mapboxArtifactGroupId = 'com.mapbox.mapboxsdk' mapboxArtifactId = project.property('POM_ARTIFACT_ID') mapboxArtifactTitle = project.property('POM_NAME') mapboxArtifactDescription = project.property('POM_DESCRIPTION') diff --git a/gradle/publish.gradle b/gradle/publish.gradle index 93b0939cb..2ea73fbc6 100644 --- a/gradle/publish.gradle +++ b/gradle/publish.gradle @@ -59,7 +59,7 @@ task androidJavadocs(type: Javadoc) { } task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { - classifier = 'javadoc' + classifier = 'dokka' from androidJavadocs.destinationDir } diff --git a/ktx-mapbox-maps/gradle.properties b/ktx-mapbox-maps/gradle.properties index a8ded9984..0bd67ab97 100644 --- a/ktx-mapbox-maps/gradle.properties +++ b/ktx-mapbox-maps/gradle.properties @@ -2,5 +2,4 @@ VERSION_NAME=0.1.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-sdk-ktx-v7 POM_NAME=Mapbox Maps SDK for Android KTX POM_DESCRIPTION=A set of Kotlin extensions for the Mapbox Maps SDK for Android. -POM_GROUP_ID=com.mapbox.mapboxsdk REGISTRY_SDK_NAME=mapbox-android-ktx diff --git a/plugin-annotation/gradle.properties b/plugin-annotation/gradle.properties index a2a90d9a7..400bb3310 100644 --- a/plugin-annotation/gradle.properties +++ b/plugin-annotation/gradle.properties @@ -2,5 +2,4 @@ VERSION_NAME=0.10.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-annotation-v9 POM_NAME=Mapbox Android Annotation Plugin POM_DESCRIPTION=Mapbox Android Annotation Plugin -POM_GROUP_ID=com.mapbox.mapboxsdk -REGISTRY_SDK_NAME=mapbox-android-annotation +REGISTRY_SDK_NAME=com-mapbox-mapboxsdk-mapbox-android-plugin-annotation-v9 diff --git a/plugin-building/gradle.properties b/plugin-building/gradle.properties index 1ff04ca2a..987d472b8 100644 --- a/plugin-building/gradle.properties +++ b/plugin-building/gradle.properties @@ -2,5 +2,4 @@ VERSION_NAME=0.8.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-building-v9 POM_NAME=Mapbox Android Building Plugin POM_DESCRIPTION=Mapbox Android Building Plugin -POM_GROUP_ID=com.mapbox.mapboxsdk -REGISTRY_SDK_NAME=mapbox-android-building +REGISTRY_SDK_NAME=com-mapbox-mapboxsdk-mapbox-android-plugin-building-v9 diff --git a/plugin-localization/gradle.properties b/plugin-localization/gradle.properties index 4a51c2d21..18c764de5 100644 --- a/plugin-localization/gradle.properties +++ b/plugin-localization/gradle.properties @@ -2,6 +2,5 @@ VERSION_NAME=0.13.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-localization-v9 POM_NAME=Mapbox Android Localization Plugin POM_DESCRIPTION=Mapbox Android Localization Plugin -POM_GROUP_ID=com.mapbox.mapboxsdk -REGISTRY_SDK_NAME=mapbox-android-localization +REGISTRY_SDK_NAME=com-mapbox-mapboxsdk-mapbox-android-plugin-localization-v9 diff --git a/plugin-markerview/gradle.properties b/plugin-markerview/gradle.properties index 5950ce1dc..9722e0e27 100644 --- a/plugin-markerview/gradle.properties +++ b/plugin-markerview/gradle.properties @@ -2,5 +2,4 @@ VERSION_NAME=0.5.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-markerview-v9 POM_NAME=Mapbox Android MarkerView Plugin POM_DESCRIPTION=Mapbox Android MarkerView Plugin -POM_GROUP_ID=com.mapbox.mapboxsdk -REGISTRY_SDK_NAME=mapbox-android-markerview +REGISTRY_SDK_NAME=com-mapbox-mapboxsdk-mapbox-android-plugin-markerview-v9 diff --git a/plugin-offline/gradle.properties b/plugin-offline/gradle.properties index 764481a46..2b80631cb 100644 --- a/plugin-offline/gradle.properties +++ b/plugin-offline/gradle.properties @@ -1,6 +1,6 @@ VERSION_NAME=0.8.0 -POM_GROUP_ID=com.mapbox.mapboxsdk POM_ARTIFACT_ID=mapbox-android-plugin-offline-v9 POM_NAME=Mapbox Android Offline Plugin POM_DESCRIPTION=Mapbox Android Offline Plugin -REGISTRY_SDK_NAME=mapbox-android-offline +REGISTRY_SDK_NAME=com-mapbox-mapboxsdk-mapbox-android-plugin-offline-v9 + diff --git a/plugin-places/gradle.properties b/plugin-places/gradle.properties index e62ada617..cae0e3d67 100644 --- a/plugin-places/gradle.properties +++ b/plugin-places/gradle.properties @@ -2,5 +2,4 @@ VERSION_NAME=0.13.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-places-v9 POM_NAME=Mapbox Android Places Plugin POM_DESCRIPTION=Mapbox Android Places Plugin -POM_GROUP_ID=com.mapbox.mapboxsdk -REGISTRY_SDK_NAME=mapbox-android-places +REGISTRY_SDK_NAME=com-mapbox-mapboxsdk-mapbox-android-plugin-places-v9 diff --git a/plugin-scalebar/gradle.properties b/plugin-scalebar/gradle.properties index c69d7fba9..3a46a6b58 100644 --- a/plugin-scalebar/gradle.properties +++ b/plugin-scalebar/gradle.properties @@ -2,5 +2,4 @@ VERSION_NAME=0.6.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-scalebar-v9 POM_NAME=Mapbox Android Scalebar Plugin POM_DESCRIPTION=Mapbox Android Scalebar Plugin -POM_GROUP_ID=com.mapbox.mapboxsdk -REGISTRY_SDK_NAME=mapbox-android-scalebar +REGISTRY_SDK_NAME=com-mapbox-mapboxsdk-mapbox-android-plugin-scalebar-v9 diff --git a/plugin-traffic/gradle.properties b/plugin-traffic/gradle.properties index 0629cb84f..e982a93e8 100644 --- a/plugin-traffic/gradle.properties +++ b/plugin-traffic/gradle.properties @@ -2,5 +2,4 @@ VERSION_NAME=0.11.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-traffic-v9 POM_NAME=Mapbox Android Traffic Plugin POM_DESCRIPTION=Mapbox Android Traffic Plugin -POM_GROUP_ID=com.mapbox.mapboxsdk -REGISTRY_SDK_NAME=mapbox-android-traffic +REGISTRY_SDK_NAME=com-mapbox-mapboxsdk-mapbox-android-plugin-traffic-v9 From 5ee801eb0c30b9cc6e710cd51bf0936af0301faa Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 23 Mar 2021 20:14:08 +0800 Subject: [PATCH 3/4] Update docker image --- circle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index b85b6c12b..16856e83e 100644 --- a/circle.yml +++ b/circle.yml @@ -10,7 +10,7 @@ jobs: build: working_directory: ~/code docker: - - image: mbgl/android-ndk-r19:8e91a7ebab + - image: mbgl/android-ndk-r21:769c31f1d8 environment: JVM_OPTS: -Xmx3200m BUILDTYPE: Debug @@ -81,7 +81,7 @@ jobs: # ------------------------------------------------------------------------------ release: docker: - - image: mbgl/android-ndk-r19:8e91a7ebab + - image: mbgl/android-ndk-r21:769c31f1d8 working_directory: ~/code environment: BUILDTYPE: Release From d0344c4b14216e9d1ed2a8748c4784b701a9db14 Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 23 Mar 2021 20:37:19 +0800 Subject: [PATCH 4/4] Update version name for offline --- plugin-offline/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin-offline/gradle.properties b/plugin-offline/gradle.properties index 2b80631cb..ee46b68d5 100644 --- a/plugin-offline/gradle.properties +++ b/plugin-offline/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.8.0 +VERSION_NAME=0.9.0-SNAPSHOT POM_ARTIFACT_ID=mapbox-android-plugin-offline-v9 POM_NAME=Mapbox Android Offline Plugin POM_DESCRIPTION=Mapbox Android Offline Plugin