-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Langston Smith
committed
May 30, 2019
1 parent
e811054
commit 0d1a547
Showing
15 changed files
with
228 additions
and
155 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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
ext { | ||
mapboxArtifactGroupId = 'com.mapbox.mapboxsdk' | ||
mapboxArtifactId = project.hasProperty('POM_ARTIFACT_ID') ? project.property('POM_ARTIFACT_ID') : System.getenv('POM_ARTIFACT_ID') | ||
mapboxArtifactTitle = project.hasProperty('POM_NAME') ? project.property('POM_NAME') : System.getenv('POM_NAME') | ||
mapboxArtifactDescription = project.hasProperty('POM_DESCRIPTION') ? project.property('POM_DESCRIPTION') : System.getenv('POM_DESCRIPTION') | ||
mapboxDeveloperName = 'Mapbox' | ||
mapboxDeveloperId = 'mapbox' | ||
mapboxArtifactUrl = 'https://github.com/mapbox/mapbox-plugins-android' | ||
mapboxArtifactVcsUrl = 'https://github.com/mapbox/mapbox-plugins-android.git' | ||
mapboxArtifactScmUrl = 'scm:[email protected]:mapbox/mapbox-plugins-android.git' | ||
mapboxArtifactLicenseName = 'BSD 2-Clause' | ||
mapboxArtifactLicenseUrl = 'https://opensource.org/licenses/BSD-2-Clause' | ||
versionName = project.hasProperty('VERSION_NAME') ? project.property('VERSION_NAME') : System.getenv('VERSION_NAME') | ||
|
||
mapboxBintrayUserOrg = 'mapbox' | ||
mapboxBintrayRepoName = 'mapbox' | ||
mapboxBintrayUser = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER') | ||
mapboxBintrayApiKey = project.hasProperty('BINTRAY_API_KEY') ? project.property('BINTRAY_API_KEY') : System.getenv('BINTRAY_API_KEY') | ||
mapboxGpgPassphrase = project.hasProperty('GPG_PASSPHRASE') ? project.property('GPG_PASSPHRASE') : System.getenv('GPG_PASSPHRASE') | ||
} |
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,156 @@ | ||
apply plugin: 'digital.wup.android-maven-publish' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'com.jfrog.bintray' | ||
apply plugin: 'com.jfrog.artifactory' | ||
apply from: file('../gradle/artifact-settings.gradle') | ||
|
||
publishing { | ||
publications { | ||
MapboxPluginPublication(MavenPublication) { | ||
from components.android | ||
groupId project.ext.mapboxArtifactGroupId | ||
artifactId project.ext.mapboxArtifactId | ||
version project.ext.versionName | ||
|
||
afterEvaluate { | ||
artifact("$buildDir/outputs/aar/${project.ext.mapboxArtifactId}-release.aar") | ||
artifact(androidSourcesJar) | ||
artifact(androidJavadocsJar) | ||
} | ||
|
||
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) | ||
} | ||
|
||
} | ||
} | ||
} | ||
|
||
bintray { | ||
user = mapboxBintrayUser | ||
key = mapboxBintrayApiKey | ||
publications = ['MapboxPluginPublication'] | ||
pkg { | ||
repo = project.ext.mapboxBintrayRepoName | ||
name = project.ext.mapboxArtifactId | ||
userOrg = project.ext.mapboxBintrayUserOrg | ||
licenses = [project.ext.mapboxArtifactLicenseName] | ||
vcsUrl = project.ext.mapboxArtifactVcsUrl | ||
publish = false | ||
version { | ||
name = project.ext.versionName | ||
desc = project.ext.mapboxArtifactDescription | ||
released = new Date() | ||
gpg { | ||
sign = true | ||
passphrase = mapboxGpgPassphrase | ||
} | ||
mavenCentralSync { | ||
sync = false | ||
} | ||
} | ||
} | ||
} | ||
|
||
artifactory { | ||
contextUrl = 'http://oss.jfrog.org' | ||
publish { | ||
repository { | ||
repoKey = 'oss-snapshot-local' | ||
username = mapboxBintrayUser | ||
password = mapboxBintrayApiKey | ||
} | ||
defaults { | ||
publications('MapboxPluginPublication') | ||
} | ||
} | ||
} | ||
|
||
task androidJavadocs(type: Javadoc) { | ||
source = android.sourceSets.main.java.sourceFiles | ||
classpath = files(android.bootClasspath) | ||
failOnError = false | ||
} | ||
|
||
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { | ||
classifier = 'javadoc' | ||
from androidJavadocs.destinationDir | ||
} | ||
|
||
task androidSourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from android.sourceSets.main.java.sourceFiles | ||
} | ||
|
||
tasks.withType(Javadoc) { | ||
options.addStringOption('encoding', 'UTF-8') | ||
options.addStringOption('docencoding', 'UTF-8') | ||
options.addStringOption('charset', 'UTF-8') | ||
} | ||
|
||
artifacts { | ||
archives androidSourcesJar | ||
archives androidJavadocsJar | ||
} | ||
|
||
afterEvaluate { project -> | ||
android.libraryVariants.all { variant -> | ||
tasks.androidJavadocs.doFirst { | ||
classpath += files(variant.javaCompile.classpath.files) | ||
} | ||
} | ||
} | ||
/* | ||
task androidJavadocs(type: Javadoc) { | ||
source = android.sourceSets.main.java.srcDirs | ||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
} | ||
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { | ||
classifier = 'dokka' | ||
from androidJavadocs.destinationDir | ||
} | ||
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 | ||
} | ||
} | ||
} | ||
*/ |
Oops, something went wrong.