Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] removed empty and print lines from gradle-bintray
Browse files Browse the repository at this point in the history
  • Loading branch information
langsmith committed Mar 5, 2019
1 parent 51c1581 commit e3696c9
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 79 deletions.
28 changes: 28 additions & 0 deletions platform/android/gradle/artifact-settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ext {
mapboxArtifactDeveloperName = 'Mapbox'
mapboxArtifactGroupId = 'com.mapbox.mapboxsdk'
mapboxArtifactUrl = 'https://github.com/mapbox/mapbox-gl-native'
mapboxArtifactVcsUrl = 'https://github.com/mapbox/mapbox-gl-native.git'
mapboxArtifactTrackerUrl = 'https://github.com/mapbox/mapbox-gl-native/issues'
mapboxArtifactScmUrl = 'scm:git@github.com:mapbox/mapbox-gl-native.git'
mapboxArtifactGitUrl = 'https://github.com/mapbox/mapbox-gl-native'
mapboxLicenseName = 'BSD'
mapboxLicenseUrl = 'https://opensource.org/licenses/BSD-2-Clause'
mapboxArtifactInceptionYear = '2014'

// versionCode = project.hasProperty('versionCode') ? project.property('versionCode') : 0
versionCode = rootProject.hasProperty('versionCode') ? project.property('versionCode') : System.getenv('VERSION_CODE')

// versionName = project.hasProperty('versionName') ? project.property('versionName') : '0.0.0'
versionName = rootProject.hasProperty('versionName') ? project.property('versionName') : System.getenv('VERSION_NAME')

mapboxBintrayUserOrg = 'mapbox'
mapboxBintrayRepoName = 'mapbox'
mapboxBintrayPackageName = 'mapbox-android-sdk'

// mapboxBintrayArtifactId is the same as mapboxArtifactGroup because of a weird bug
// https://github.com/bintray/gradle-bintray-plugin/issues/88
mapboxArtifactId = 'mapbox-android-sdk'
mapboxArtifactTitle = 'Mapbox Maps SDK for Android'
mapboxArtifactDescription = 'Mapbox Maps SDK for Android'
}
24 changes: 0 additions & 24 deletions platform/android/gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,28 +76,4 @@ ext {
lintChecks : "com.android.tools.lint:lint-checks:${versions.lint}",
lintTests : "com.android.tools.lint:lint-tests:${versions.lint}"
]

mapboxArtifactDeveloperName = 'Mapbox'
mapboxArtifactGroup = 'com.mapbox.mapboxsdk'
mapboxArtifactUrl = 'https://github.com/mapbox/mapbox-gl-native'
mapboxArtifactVcsUrl = 'https://github.com/mapbox/mapbox-gl-native.git'
mapboxArtifactTrackerUrl = 'https://github.com/mapbox/mapbox-gl-native/issues'
mapboxArtifactScmUrl = 'scm:git@github.com:mapbox/mapbox-gl-native.git'
mapboxArtifactGitUrl = 'https://github.com/mapbox/mapbox-gl-native'
mapboxLicenseName = 'BSD'
mapboxLicenseUrl = 'https://opensource.org/licenses/BSD-2-Clause'
mapboxArtifactInceptionYear = '2014'

versionCode = project.hasProperty('versionCode') ? project.property('versionCode') : 0
versionName = project.hasProperty('versionName') ? project.property('versionName') : '0.0.0'

mapboxBintrayUserOrg = 'mapbox'
mapboxBintrayRepoName = 'mapbox'
mapboxBintrayPackageName = 'mapbox-android-sdk'

// mapboxBintrayArtifactId is the same as mapboxArtifactGroup because of a weird bug
// https://github.com/bintray/gradle-bintray-plugin/issues/88
mapboxBintrayArtifactId = 'com.mapbox.mapboxsdk'
mapboxArtifactTitle = 'Mapbox Maps SDK for Android'
mapboxBintrayDescription = 'Mapbox Maps SDK for Android'
}
127 changes: 72 additions & 55 deletions platform/android/gradle/gradle-bintray.gradle
Original file line number Diff line number Diff line change
@@ -1,93 +1,65 @@
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply from: file('../gradle/artifact-settings.gradle')

bintray {
println 'Starting bintray task'

user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_KEY')
publications = ['MapboxMapsSdkPublication']
dryRun = false // Whether to run this as dry-run, without deploying
publish = false // Whether version should be auto published after an upload
override = false // Whether to override version artifacts already published
pkg {
userOrg = rootProject.ext.mapboxBintrayUserOrg
repo = rootProject.ext.mapboxBintrayRepoName
name = rootProject.ext.mapboxBintrayPackageName
desc = rootProject.ext.mapboxBintrayDescription

websiteUrl = rootProject.ext.mapboxArtifactUrl
issueTrackerUrl = rootProject.ext.mapboxArtifactTrackerUrl
vcsUrl = rootProject.ext.mapboxArtifactVcsUrl

licenses = [rootProject.ext.mapboxLicenseName]

version {
name = rootProject.ext.versionName
desc = rootProject.ext.mapboxBintrayDescription
released = new Date()
gpg {
sign = false
passphrase = rootProject.hasProperty('gpgPassphrase') ? project.property('gpgPassphrase') : System.getenv('GPG_PASSPHRASE')
}

mavenCentralSync {
sync = false
}
}
}
println 'Done with bintray task'
group = project.ext.mapboxArtifactGroupId
project.archivesBaseName = project.ext.mapboxArtifactId

}

install {
repositories.mavenInstaller {
pom.project {
println 'starting install task'

name rootProject.ext.mapboxBintrayPackageName
// Make sure that artifactId and name are the same String values!
// https://github.com/bintray/gradle-bintray-plugin/issues/81#issuecomment-149632738

name project.ext.mapboxBintrayPackageName
println 'name = ' + name

description rootProject.ext.mapboxBintrayDescription
url rootProject.ext.mapboxArtifactGitUrl
inceptionYear rootProject.ext.mapboxArtifactInceptionYear
description project.ext.mapboxArtifactDescription
println 'description = ' + description
url project.ext.mapboxArtifactGitUrl
inceptionYear project.ext.mapboxArtifactInceptionYear

packaging 'aar'
groupId rootProject.ext.mapboxArtifactGroup
artifactId rootProject.ext.mapboxBintrayArtifactId
version rootProject.ext.versionName
groupId project.ext.mapboxArtifactGroupId
artifactId project.ext.mapboxArtifactId
version VERSION_NAME
println 'version = ' + version

scm {
connection rootProject.ext.mapboxArtifactVcsUrl
url rootProject.ext.mapboxArtifactScmUrl
connection project.ext.mapboxArtifactVcsUrl
url project.ext.mapboxArtifactScmUrl
}

developers {
developer {
name rootProject.ext.mapboxArtifactDeveloperName
name project.ext.mapboxArtifactDeveloperName
}
}

licenses {
license {
name rootProject.ext.mapboxLicenseName
url rootProject.ext.mapboxLicenseUrl
name project.ext.mapboxLicenseName
url project.ext.mapboxLicenseUrl
distribution 'repo'
}
}
println 'ending install task'

}
}
}


publishing {
println 'Starting publishing task'
publications {
MapboxMapsSdkPublication(MavenPublication) {
// Define this explicitly if using implementation or api configurations

pom.withXml {

def dependenciesNode = asNode().getAt('dependencies')[0] ?: asNode().appendNode('dependencies')
// Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each

// Iterate over the implementation dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.implementation.allDependencies.each {
// Ensure dependencies such as fileTree are not included.
if (it.name != 'unspecified') {
Expand All @@ -100,5 +72,50 @@ publishing {
}
}
}
println 'Ending publishing task'
}

bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')

key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_KEY')

publications = ['MapboxMapsSdkPublication']
dryRun = false // Whether to run this as dry-run, without deploying
publish = false // Whether version should be auto published after an upload
override = true // Whether to override version artifacts already published
pkg {
userOrg = project.ext.mapboxBintrayUserOrg
println 'pkg userOrg = ' + userOrg

repo = project.ext.mapboxBintrayRepoName
println 'pkg repo = ' + repo

name = project.ext.mapboxBintrayPackageName
println 'pkg name = ' + name

desc = project.ext.mapboxArtifactDescription
websiteUrl = project.ext.mapboxArtifactUrl
issueTrackerUrl = project.ext.mapboxArtifactTrackerUrl
vcsUrl = project.ext.mapboxArtifactVcsUrl
licenses = [project.ext.mapboxLicenseName]
version {
name = VERSION_NAME
println 'version name = ' + name

desc = project.ext.mapboxArtifactDescription
println 'version desc = ' + desc

released = new Date()
println 'version released = ' + released

gpg {
sign = false
passphrase = project.hasProperty('gpgPassphrase') ? project.property('gpgPassphrase') : System.getenv('GPG_PASSPHRASE')
}
mavenCentralSync {
sync = false
}
}
}
}

0 comments on commit e3696c9

Please sign in to comment.