[android] publish SNAPSHOTs to oss.jfrog.org

This commit is contained in:
Łukasz Paczos
2019-03-08 13:26:48 +01:00
committed by Łukasz Paczos
parent 744d92e763
commit c4115f0539
6 changed files with 28 additions and 3 deletions

View File

@@ -707,6 +707,11 @@ android-ui-test: platform/android/gradle/configuration.gradle
run-android-upload-to-bintray: platform/android/gradle/configuration.gradle
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=all :MapboxGLAndroidSDK:bintrayUpload
# Uploads the compiled Android SDK SNAPSHOT to oss.jfrog.org
.PHONY: run-android-upload-to-artifactory
run-android-upload-to-artifactory: platform/android/gradle/configuration.gradle
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=all :MapboxGLAndroidSDK:artifactoryPublish
# Dump system graphics information for the test app
.PHONY: android-gfxinfo
android-gfxinfo:

View File

@@ -672,6 +672,8 @@ jobs:
version=$(cat platform/android/MapboxGLAndroidSDK/gradle.properties | grep "VERSION_NAME")
if [[ $version != *"SNAPSHOT"* ]]; then
make run-android-upload-to-bintray
else
make run-android-upload-to-artifactory
fi
fi
# ------------------------------------------------------------------------------

View File

@@ -98,11 +98,11 @@ More information about building and distributing this project in [DISTRIBUTE.md]
#### Using the SDK snapshot
Instead of using the latest stable release of the Maps SDK for Android, you can use a "snapshot" or the beta version if there is one available. Our snapshots are built every time a Github pull request adds code to this repository's `master` branch. If you'd like to use a snapshot build, your Android project's gradle file should have -SNAPSHOT appended to the SDK version number. For example, the `5.2.0-SNAPSHOT` would look like:
Instead of using the latest stable release of the Maps SDK for Android, you can use a "snapshot" or the beta version if there is one available. Our snapshots are built every time a Github pull request adds code to this repository's `master` branch. If you'd like to use a snapshot build, your Android project's gradle file should have -SNAPSHOT appended to the SDK version number. For example, the `7.3.0-SNAPSHOT` would look like:
```java
// Mapbox SDK dependency
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:5.2.0-SNAPSHOT'
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:7.3.0-SNAPSHOT'
```
You also need to have the section below in your build.gradle root folder to be able to resolve the SNAPSHOT dependencies:
@@ -110,7 +110,7 @@ You also need to have the section below in your build.gradle root folder to be a
allprojects {
repositories {
jcenter()
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local/' }
}
}
```

View File

@@ -10,6 +10,7 @@ buildscript {
classpath dependenciesList.licensesPlugin
classpath dependenciesList.kotlinPlugin
classpath dependenciesList.bintrayPlugin
classpath dependenciesList.artifactoryPlugin
classpath dependenciesList.androidPublishPlugin
}
}

View File

@@ -25,6 +25,7 @@ ext {
kotlin : '1.3.11',
licenses : '0.8.42',
bintray : '1.8.4',
artifactory : '4.9.3',
androidPublish : '3.6.2',
lint : '26.1.4',
gms : '16.0.0',
@@ -69,6 +70,7 @@ ext {
kotlinPlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}",
licensesPlugin : "com.jaredsburrows:gradle-license-plugin:${versions.licenses}",
bintrayPlugin : "com.jfrog.bintray.gradle:gradle-bintray-plugin:${versions.bintray}",
artifactoryPlugin : "org.jfrog.buildinfo:build-info-extractor-gradle:${versions.artifactory}",
androidPublishPlugin : "digital.wup:android-maven-publish:${versions.androidPublish}",
lint : "com.android.tools.lint:lint:${versions.lint}",

View File

@@ -1,6 +1,7 @@
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')
version = project.ext.versionName
@@ -70,6 +71,20 @@ bintray {
}
}
artifactory {
contextUrl = 'http://oss.jfrog.org'
publish {
repository {
repoKey = 'oss-snapshot-local'
username = mapboxBintrayUser
password = mapboxBintrayApiKey
}
defaults {
publications('MapboxMapsSdkPublication')
}
}
}
task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.sourceFiles
classpath = files(android.bootClasspath)