summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorLeith Bade <leith@mapbox.com>2015-01-13 21:14:44 +1100
committerLeith Bade <leith@mapbox.com>2015-01-13 21:14:44 +1100
commit65e6990582d264ad8fb4972836c69fb6a60b3010 (patch)
treeaa52befea73276dbce8a7607dab961145209b9cf /android
parentd29fe6fe92c119bc7173287a4bf565131e5d64ab (diff)
downloadqtlocation-mapboxgl-65e6990582d264ad8fb4972836c69fb6a60b3010.tar.gz
Grab access token from environment
Diffstat (limited to 'android')
-rw-r--r--android/java/app/build.gradle9
1 files changed, 9 insertions, 0 deletions
diff --git a/android/java/app/build.gradle b/android/java/app/build.gradle
index 96b8f0d1e0..1bc65f6fa2 100644
--- a/android/java/app/build.gradle
+++ b/android/java/app/build.gradle
@@ -1,5 +1,14 @@
apply plugin: 'com.android.application'
+task accessToken {
+ def tokenFile = new File("app/src/main/res/raw/token.txt")
+ tokenFile.write(System.getenv('MAPBOX_ACCESS_TOKEN'))
+}
+
+gradle.projectsEvaluated {
+ preBuild.dependsOn('accessToken')
+}
+
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"