-
Notifications
You must be signed in to change notification settings - Fork 117
Add sdk-registry config #1177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add sdk-registry config #1177
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,15 @@ | ||
| ext { | ||
| mapboxArtifactGroupId = 'com.mapbox.mapboxsdk' | ||
| 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') | ||
| } |
This file contains hidden or 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 hidden or 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,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) { | ||
| task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { | ||
| classifier = 'dokka' | ||
| 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 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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,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 |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -2,4 +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_PACKAGING=aar | ||
| REGISTRY_SDK_NAME=mapbox-android-ktx | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this the correct name? looks different than the other names.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems we have never released this before. Please correct me if I'm wrong. @tobrun |
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,5 +1,6 @@ | ||
| VERSION_NAME=0.8.0-SNAPSHOT | ||
| 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 | ||
| POM_PACKAGING=aar | ||
| REGISTRY_SDK_NAME=com-mapbox-mapboxsdk-mapbox-android-plugin-offline-v9 | ||
|
|
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably should use ndk-r21e?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's align with maps sdk v9