Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
Integrate gradle-play-publisher, fix codebase for release
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun committed Mar 7, 2018
1 parent a0885d7 commit 922aa41
Show file tree
Hide file tree
Showing 18 changed files with 87 additions and 48 deletions.
29 changes: 21 additions & 8 deletions MapboxAndroidDemo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
apply plugin: 'com.android.application'
apply from: "$project.rootDir/gradle/script-git-version.gradle"
apply plugin: 'com.google.firebase.firebase-perf'

apply plugin: 'com.github.triplet.play'
apply from: "$project.rootDir/gradle/script-git-version.gradle"

android {
compileSdkVersion androidVersions.compileSdkVersion
buildToolsVersion androidVersions.buildToolsVersion

playAccountConfigs {
defaultAccountConfig {
serviceAccountEmail = 'mapbox-android-demo-publish@android-gl-native.iam.gserviceaccount.com'
jsonFile = file("$project.rootDir/android-gl-native-6d21dd280e7b.json")
}
}

defaultConfig {
applicationId "com.mapbox.mapboxandroiddemo"

Expand All @@ -19,6 +26,8 @@ android {
vectorDrawables.useSupportLibrary = true

buildConfigField "int", "MIN_SDK_VERSION", "$minSdkVersion.apiLevel"

playAccountConfig = playAccountConfigs.defaultAccountConfig
}

flavorDimensions "default"
Expand All @@ -35,10 +44,10 @@ android {

signingConfigs {
release {
keyAlias System.getenv("BITRISEIO_ANDROID_KEYSTORE_ALIAS")
keyPassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD")
keyAlias System.getenv("CIRCLECI_ANDROID_KEYSTORE_ALIAS")
keyPassword System.getenv("CIRCLECI_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD")
storeFile file("$project.rootDir/mapbox_demo.keystore")
storePassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PASSWORD")
storePassword System.getenv("CIRCLECI_ANDROID_KEYSTORE_PASSWORD")
}
}

Expand Down Expand Up @@ -68,6 +77,11 @@ android {
lintOptions {
abortOnError false
}

play {
track = 'alpha'
untrackOld = true
}
}

dependencies {
Expand All @@ -85,9 +99,8 @@ dependencies {
implementation dependenciesList.supportV4
implementation dependenciesList.supportConstraintLayout


// Mapbox dependencies
api (dependenciesList.mapboxMapSdk)
api(dependenciesList.mapboxMapSdk)
implementation dependenciesList.mapboxTurf
implementation dependenciesList.mapboGeoJson

Expand All @@ -109,7 +122,7 @@ dependencies {

implementation 'com.github.javiersantos:MaterialStyledDialogs:2.1'
implementation 'com.getbase:floatingactionbutton:1.10.1'
implementation 'com.afollestad.material-dialogs:commons:0.9.4.5'
implementation 'com.afollestad.material-dialogs:commons:0.9.6.0'
implementation 'com.github.Cutta:GifView:1.1'

// Square crew
Expand Down
1 change: 1 addition & 0 deletions MapboxAndroidDemo/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
-dontwarn com.google.**
-dontwarn java.nio.**
-dontwarn javax.annotation.**
-dontwarn java.awt.**

-keep class com.segment.analytics.** { *; }
-keep class com.mapbox.mapboxandroiddemo.model.usermodel.** { *; }
24 changes: 0 additions & 24 deletions MapboxAndroidDemo/src/gpservices/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,6 @@
android:value="com.mapbox.mapboxandroiddemo.MainActivity"/>
</activity>

<activity
android:name=".examples.javaservices.GeocodingActivity"
android:label="@string/activity_mas_geocoding_title">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.mapbox.mapboxandroiddemo.MainActivity"/>
</activity>

<activity
android:name=".examples.javaservices.StaticImageActivity"
android:label="@string/activity_java_services_static_image_title">
Expand Down Expand Up @@ -164,22 +156,6 @@
android:value="com.mapbox.mapboxandroiddemo.MainActivity"/>
</activity>

<activity
android:name=".examples.annotations.CustomInfoWindowActivity"
android:label="@string/activity_annotation_custom_info_window_title">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.mapbox.mapboxandroiddemo.MainActivity"/>
</activity>

<activity
android:name=".examples.annotations.BasicMarkerViewActivity"
android:label="@string/activity_annotation_marker_view_title">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.mapbox.mapboxandroiddemo.MainActivity"/>
</activity>

<activity
android:name=".examples.annotations.AnimatedMarkerActivity"
android:label="@string/activity_annotation_animated_marker_title">
Expand Down
1 change: 1 addition & 0 deletions MapboxAndroidDemo/src/gpservices/play/contactEmail
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[email protected]
Empty file.
1 change: 1 addition & 0 deletions MapboxAndroidDemo/src/gpservices/play/contactWebsite
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://www.mapbox.com
1 change: 1 addition & 0 deletions MapboxAndroidDemo/src/gpservices/play/defaultLanguage
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
en-US
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The Mapbox Android demo app lets you explore what’s possible with our open-source Maps SDK for Android. From adding annotations to the map, maneuvering the map camera to different positions, or using your maps offline, the Mapbox Android demo app gives you the inspiration to push our SDK to its limits.

Mapbox creates building blocks for mobile developers to add beautiful maps and location services to their mobile applications. Companies like Pinterest, Lonely Planet, Uber, The Weather Channel, Under Armour, Human, Github, CNN, and National Geographic use our tools to create beautiful maps.

Download this app and visit https://www.mapbox.com/android-sdk/ to get started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Explore what’s possible to build with the Mapbox Maps SDK for Android
1 change: 1 addition & 0 deletions MapboxAndroidDemo/src/gpservices/play/en-US/listing/title
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Mapbox Demo
Empty file.
1 change: 1 addition & 0 deletions MapboxAndroidDemo/src/gpservices/play/en-US/whatsnew
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This update is in line with the 5.5.0 release of the Mapbox Maps SDK for Android.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ private void showFileChooserDialog() {
new FileChooserDialog.Builder(this)
.extensionsFilter(".geojson", ".json", ".js", ".txt")
.goUpLabel("Up")
.show();
.show(this);
}

@Override
Expand Down
8 changes: 4 additions & 4 deletions MapboxAndroidWearDemo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ android {
}
signingConfigs {
release {
keyAlias System.getenv("BITRISEIO_ANDROID_KEYSTORE_ALIAS")
keyPassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD")
keyAlias System.getenv("CIRCLECI_ANDROID_KEYSTORE_ALIAS")
keyPassword System.getenv("CIRCLECI_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD")
storeFile file("$project.rootDir/mapbox_demo.keystore")
storePassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PASSWORD")
storePassword System.getenv("CIRCLECI_ANDROID_KEYSTORE_PASSWORD")
}
}
buildTypes {
Expand All @@ -46,7 +46,7 @@ dependencies {
implementation wearDependencies.gpsLocation

// Mapbox dependencies
api (dependenciesList.mapboxMapSdk)
api(dependenciesList.mapboxMapSdk)

// Firebase
implementation dependenciesList.firebaseCrash
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ buildscript {
dependencies {
classpath pluginDependencies.gradle
classpath pluginDependencies.firebase
classpath pluginDependencies.playPublisher
}

}
Expand All @@ -25,7 +26,6 @@ allprojects {
google()
maven { url "https://jitpack.io" }
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://maven.google.com" }
}
}

Expand Down
47 changes: 44 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@ workflows:
version: 2
default:
jobs:
- primary

- primary:
filters:
tags:
only: /.*/
branches:
only: /.*/
- release:
filters:
tags:
only: /.*/
branches:
ignore: /.*/
# ------------------------------------------------------------------------------
jobs:
primary:
docker:
Expand Down Expand Up @@ -49,4 +60,34 @@ jobs:
./gradlew :MapboxAndroidDemo:assembleGpservicesDebug --continue
gcloud firebase test android run --type robo --app MapboxAndroidDemo/build/outputs/apk/gpservices/debug/MapboxAndroidDemo-gpservices-debug.apk --device-ids shamu --os-version-ids 22 --locales en --orientations portrait --timeout 5m
- store_artifacts:
path: MapboxAndroidDemo/build/outputs/apk/gpservices/debug/MapboxAndroidDemo-gpservices-debug.apk
path: MapboxAndroidDemo/build/outputs/apk/gpservices/debug/MapboxAndroidDemo-gpservices-debug.apk
# ------------------------------------------------------------------------------
release:
docker:
- image: mbgl/7d2403f42e:android-ndk-r16b
working_directory: ~/code
environment:
JVM_OPTS: -Xmx3200m
BUILDTYPE: Debug
IS_LOCAL_DEVELOPMENT: false
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "MapboxAndroidDemo/build.gradle" }}
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "MapboxAndroidDemo/build.gradle" }}
- run:
name: Export developer-config.xml & Google Play authentication json
command: |
#!/bin/bash
echo "${MAPBOX_DEVELOPER_CONFIG}" > SharedCode/src/main/res/values/developer-config.xml
echo "${PLAY_PUBLISH_AUTH_JSON}" > android-gl-native-6d21dd280e7b.json
- run:
name: Release to Google Play
command: ./gradlew publishGpservicesRelease
# ------------------------------------------------------------------------------
10 changes: 4 additions & 6 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ ext {
buildToolsVersion: '26.0.3'
]

versionCode = 0.1
versionName = "5.0.0"

version = [
// mapbox
mapboxMapSdk : '5.5.0',
Expand Down Expand Up @@ -96,9 +93,10 @@ ext {
]

pluginDependencies = [
gradle : "com.android.tools.build:gradle:${pluginVersion.gradle}",
checkstyle: "com.puppycrawl.tools:checkstyle:${pluginVersion.checkstyle}",
firebase : "com.google.firebase:firebase-plugins:${pluginVersion.firebase}",
gradle : "com.android.tools.build:gradle:${pluginVersion.gradle}",
checkstyle : "com.puppycrawl.tools:checkstyle:${pluginVersion.checkstyle}",
firebase : "com.google.firebase:firebase-plugins:${pluginVersion.firebase}",
playPublisher: "com.github.triplet.gradle:play-publisher:${pluginVersion.gradlePlayPublisher}"
]

wearDependencies = [
Expand Down
1 change: 0 additions & 1 deletion whatsnew/whatsnew-en-US

This file was deleted.

0 comments on commit 922aa41

Please sign in to comment.