Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[main]
host = https://www.transifex.com
minimum_perc = 80

[mapbox-java.libandroiduistrings]
file_filter = mapboxmapbox/libandroid-ui/src/main/res/values-<lang>/strings.xml
source_file = mapbox/libandroid-ui/src/main/res/values/strings.xml
source_lang = en
type = ANDROID

[mapbox-java.libandroidtelemetrystrings]
file_filter = mapbox/libandroid-telemetry/src/main/res/values-<lang>/strings.xml
source_file = mapbox/libandroid-telemetry/src/main/res/values/strings.xml
source_lang = en
type = ANDROID

[mapbox-java.libandroidservicesstrings]
file_filter = mapbox/libandroid-services/src/main/res/values-<lang>/strings.xml
source_file = mapbox/libandroid-services/src/main/res/values/strings.xml
source_lang = en
type = ANDROID

[mapbox-java.testappstrings]
file_filter = mapbox/app/src/main/res/values-<lang>/strings.xml
source_file = mapbox/app/src/main/res/values/strings.xml
source_lang = en
type = ANDROID
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![](https://raw.githubusercontent.com/mapbox/mapbox-java/master/.github/splash-img.png)](https://www.mapbox.com/android-docs/mapbox-services/)

[![Build Status](https://www.bitrise.io/app/a7eea7d04be1e2e5.svg?token=OruuJNhnjyeRnlBv0wXsFQ&branch=master)](https://www.bitrise.io/app/a7eea7d04be1e2e5) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.mapbox.mapboxsdk/mapbox-android-services/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.mapbox.mapboxsdk/mapbox-android-services)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.mapbox.mapboxsdk/mapbox-android-services/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.mapbox.mapboxsdk/mapbox-android-services) [![CircleCI](https://circleci.com/gh/mapbox/mapbox-java.svg?style=svg)](https://circleci.com/gh/mapbox/mapbox-java)

Mapbox Android Services contains directions, geocoding, and many more APIs to use inside your Android or Java application. This repository holds the source code for the project and is divided into several modules to make it easier for developers to only include the dependencies needed for their project.

Expand Down
124 changes: 124 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
version: 2

workflows:
version: 2
default:
jobs:
- build
- release
jobs:
build:
working_directory: ~/code
docker:
- image: mbgl/ci@sha256:c34e221294d81da80918d3e9a9df5de795b067e88f86d7c9a5e262763332536e
environment:
JVM_OPTS: -Xmx3200m
BUILDTYPE: Debug
IS_LOCAL_DEVELOPMENT: false
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "mapbox/build.gradle" }}-{{ checksum "mapbox/app/build.gradle" }}
- run:
name: Accept Android license
command: |
echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;26.0.1"
- run:
name: Download Dependencies
command: cd mapbox && ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "mapbox/build.gradle" }}-{{ checksum "mapbox/app/build.gradle" }}
- run:
name: Check Java code style
command: make checkstyle
- run:
name: Run unit-test in Java libraries
command: make test-java
- run:
name: Run unit-test in Android libraries
command: make test-android
- run:
name: Build testapp APK
command: |
cd mapbox && ./gradlew accessToken
./gradlew app:assembleDebug
- run:
name: Log in to Google Cloud Platform
shell: /bin/bash -euo pipefail
command: |
echo "${GCLOUD_SERVICE_ACCOUNT_JSON}" > secret.json
gcloud auth activate-service-account --key-file secret.json --project mapbox-java
rm secret.json
- run:
name: Run instrumentation tests on Firebase
no_output_timeout: 1200
shell: /bin/bash -euo pipefail
command: |
gcloud firebase test android run --type robo --app mapbox/app/build/outputs/apk/app-debug.apk --device-ids shamu --os-version-ids 22 --locales en --orientations portrait --timeout 10m
- run:
name: Update Transifex
command: |
if [ "${CIRCLE_BRANCH}" == "${DEPLOY_BRANCH}" ]; then
pip install transifex-client
echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = '"${TRANSIFEX_USER}"$'\npassword = '"${TRANSIFEX_API_TOKEN}"$'\ntoken = '""$'\n' > ~/.transifexrc
tx push -s
else
echo "Skipping push to Transifex"
fi
- store_artifacts:
path: mapbox/app/build/reports
destination: reports
- store_test_results:
path: mapbox/app/build/test-results

# ------------------------------------------------------------------------------
release:
branch:
only:
- master
docker:
- image: mbgl/ci@sha256:c34e221294d81da80918d3e9a9df5de795b067e88f86d7c9a5e262763332536e
working_directory: ~/code
environment:
environment:
BUILDTYPE: Release
IS_LOCAL_DEVELOPMENT: false
steps:
- checkout
- run:
name: Accept Android license
command: |
echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;26.0.1"
- run:
name: Generate Maven credentials
shell: /bin/bash -euo pipefail
command: |
aws s3 cp s3://mapbox/android/signing-credentials/secring.gpg secring.gpg
echo "NEXUS_USERNAME=$PUBLISH_NEXUS_USERNAME
NEXUS_PASSWORD=$PUBLISH_NEXUS_PASSWORD
signing.keyId=$SIGNING_KEYID
signing.password=$SIGNING_PASSWORD
signing.secretKeyRingFile=../../secring.gpg" >> mapbox/gradle.properties
- run:
name: Build Java libraries
command: make build-release-java
- run:
name: Build Android libraries
command: make build-release-android
- deploy:
name: Publish Java Services To Maven Central
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
make publish-java ;
fi
- deploy:
name: Publish Android Services To Maven Central
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
make publish-android ;
fi
- store_artifacts:
path: mapbox/app/build/reports
destination: reports
199 changes: 0 additions & 199 deletions scripts/bitrise.yml

This file was deleted.