summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2016-11-07 09:25:17 +0100
committerGitHub <noreply@github.com>2016-11-07 09:25:17 +0100
commitc5992d71f5b011e6b664532fdc2abbb8d3c51a0b (patch)
tree644fa91098429f7eaf3334a7d262ca36393b12f0 /platform
parentafd43eea3aeaf1123a75637d6b008971a3519396 (diff)
downloadqtlocation-mapboxgl-c5992d71f5b011e6b664532fdc2abbb8d3c51a0b.tar.gz
[android] - cleanup unused resources and gradle configurations. (#6896)
Diffstat (limited to 'platform')
-rw-r--r--platform/android/MapboxGLAndroidSDK/build.gradle224
-rwxr-xr-xplatform/android/MapboxGLAndroidSDK/deploy.sh2
-rw-r--r--platform/android/MapboxGLAndroidSDK/gradle-javadoc.gradle21
-rw-r--r--platform/android/MapboxGLAndroidSDK/gradle-publish.gradle153
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/build.gradle85
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/gradle-config.gradle22
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/gradle-device-farm.gradle43
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/gradle-make.gradle18
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/lint.xml34
-rwxr-xr-xplatform/android/MapboxGLAndroidSDKTestApp/update_icons.sh21
-rw-r--r--platform/android/MapboxGLAndroidSDKWearTestApp/build.gradle30
-rw-r--r--platform/android/MapboxGLAndroidSDKWearTestApp/gradle-config.gradle22
-rw-r--r--platform/android/build.gradle2
-rw-r--r--platform/android/checkstyle.gradle16
-rw-r--r--platform/android/checkstyle.xml217
15 files changed, 298 insertions, 612 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/build.gradle b/platform/android/MapboxGLAndroidSDK/build.gradle
index 64f7ac2a7e..e18b4ab4d6 100644
--- a/platform/android/MapboxGLAndroidSDK/build.gradle
+++ b/platform/android/MapboxGLAndroidSDK/build.gradle
@@ -1,20 +1,4 @@
apply plugin: 'com.android.library'
-apply plugin: 'checkstyle'
-apply plugin: 'maven'
-apply plugin: 'signing'
-
-allprojects {
- group project.GROUP
- version project.VERSION_NAME
-
- repositories {
- mavenCentral()
- }
-}
-
-repositories {
- mavenCentral()
-}
ext {
supportLibVersion = '25.0.0'
@@ -46,10 +30,12 @@ android {
}
android {
+ // avoid naming conflicts, force usage of prefix
resourcePrefix 'mapbox_'
}
sourceSets {
+ // limit amount of exposed library resources
main.res.srcDirs += 'src/main/res-public'
}
@@ -73,94 +59,13 @@ android {
}
release {
- jniDebuggable false
+ // aar proguard configuration
consumerProguardFiles 'proguard-rules.pro'
+ jniDebuggable false
}
}
}
-configurations {
- all*.exclude group: 'commons-logging', module: 'commons-logging'
- all*.exclude group: 'commons-collections', module: 'commons-collections'
-}
-
-android.libraryVariants.all { variant ->
- def name = variant.name
- //noinspection GroovyAssignabilityCheck
- task "javadoc$name"(type: Javadoc) {
- description = "Generates javadoc for build $name"
- failOnError = false
- destinationDir = new File(destinationDir, variant.baseName)
- source = files(variant.javaCompile.source)
- classpath = files(variant.javaCompile.classpath.files) + files(android.bootClasspath)
- options.windowTitle("Mapbox Android SDK $VERSION_NAME Reference")
- options.docTitle("Mapbox Android SDK $VERSION_NAME")
- options.header("Mapbox Android SDK $VERSION_NAME Reference")
- options.bottom("&copy; 2015&ndash;2016 Mapbox. All rights reserved.")
- options.links("http://docs.oracle.com/javase/7/docs/api/")
- options.linksOffline("http://d.android.com/reference/", "$System.env.ANDROID_HOME/docs/reference")
- options.overview("src/main/java/overview.html")
- options.group("Mapbox Android SDK", "com.mapbox.*")
- options.group("Third Party Libraries", "com.almeros.*")
- exclude '**/R.java', '**/BuildConfig.java', 'com/almeros/**'
- }
-}
-
-/*
-task cleanJNIBuilds {
- def jniLibsDir = new File("MapboxGLAndroidSDK/src/main/jniLibs")
- delete jniLibsDir.absolutePath
-}
-*/
-
-android.libraryVariants.all { variant ->
- def name = variant.buildType.name
- def checkstyle = project.tasks.create "checkstyle${name.capitalize()}", Checkstyle
- checkstyle.dependsOn variant.javaCompile
- checkstyle.source variant.javaCompile.source
- checkstyle.classpath = project.fileTree(variant.javaCompile.destinationDir)
- checkstyle.exclude('**/BuildConfig.java')
- checkstyle.exclude('**/R.java')
- checkstyle.exclude('**/com/almeros/android/multitouch/**')
- project.tasks.getByName("check").dependsOn checkstyle
-}
-
-// From https://raw.github.com/mcxiaoke/gradle-mvn-push/master/jar.gradle
-android.libraryVariants.all { variant ->
- def jarTask = project.tasks.create(name: "jar${variant.name.capitalize()}", type: Jar) {
- from variant.javaCompile.destinationDir
- exclude "**/R.class"
- exclude "**/BuildConfig.class"
- }
- jarTask.dependsOn variant.javaCompile
- artifacts.add('archives', jarTask);
-}
-
-// From https://raw.github.com/mcxiaoke/gradle-mvn-push/master/gradle-mvn-push.gradle
-def isReleaseBuild() {
- return VERSION_NAME.contains("SNAPSHOT") == false
-}
-
-def getReleaseRepositoryUrl() {
- return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL :
- "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
-}
-
-def getSnapshotRepositoryUrl() {
- return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL :
- "https://oss.sonatype.org/content/repositories/snapshots/"
-}
-
-def getRepositoryUsername() {
- return hasProperty('USERNAME') ? USERNAME :
- (hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "")
-}
-
-def getRepositoryPassword() {
- return hasProperty('PASSWORD') ? PASSWORD :
- (hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "")
-}
-
def getGitRevision() {
def cmd = "git rev-parse --short HEAD"
def proc = cmd.execute()
@@ -168,121 +73,10 @@ def getGitRevision() {
return ref
}
-task apklib(type: Zip) {
- appendix = extension = 'apklib'
-
- from 'AndroidManifest.xml'
- into('res') {
- from 'res'
- }
- into('src') {
- from 'src'
- }
-}
-
-artifacts {
- archives apklib
-}
-
-afterEvaluate { project ->
- uploadArchives {
- repositories {
- mavenDeployer {
- beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
-
- pom.groupId = GROUP
- pom.artifactId = POM_ARTIFACT_ID
- pom.version = VERSION_NAME
-
- repository(url: getReleaseRepositoryUrl()) {
- authentication(userName: getRepositoryUsername(),
- password: getRepositoryPassword())
- }
- snapshotRepository(url: getSnapshotRepositoryUrl()) {
- authentication(userName: getRepositoryUsername(),
- password: getRepositoryPassword())
- }
-
-/*
- // Leaving out as artifact was incorrectly named when found
- addFilter('aar') { artifact, file ->
- artifact.name == archivesBaseName
- }
- addFilter('apklib') { artifact, file ->
- artifact.name == archivesBaseName + '-apklib'
- }
-*/
-
- pom.project {
- name POM_NAME
- packaging POM_PACKAGING
- description POM_DESCRIPTION
- url POM_URL
-
- scm {
- url POM_SCM_URL
- connection POM_SCM_CONNECTION
- developerConnection POM_SCM_DEV_CONNECTION
- }
-
- licenses {
- license {
- name POM_LICENCE_NAME
- url POM_LICENCE_URL
- distribution POM_LICENCE_DIST
- }
- }
-
- developers {
- developer {
- id POM_DEVELOPER_ID
- name POM_DEVELOPER_NAME
- }
- }
- }
- }
- }
- }
-
- signing {
- required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
- sign configurations.archives
- }
-
- task androidJavadocs(type: Javadoc) {
- source = android.sourceSets.main.java.sourceFiles
- classpath = files(android.bootClasspath)
- }
-
- task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
- classifier = 'javadoc'
- from androidJavadocs.destinationDir
- }
-
- task androidSourcesJar(type: Jar) {
- classifier = 'sources'
- from android.sourceSets.main.java.sourceFiles
- }
-
- artifacts {
- archives androidSourcesJar
- archives androidJavadocsJar
- }
-}
-
-
-task makeClean(type: Exec) {
- workingDir '../../'
- commandLine 'make', 'clean'
-}
-
-task makeAndroid(type: Exec) {
- workingDir '../../'
- commandLine 'make', 'android'
-}
-
-task makeAndroidAll(type: Exec) {
- workingDir '../../'
- commandLine 'make', 'apackage'
+configurations {
+ all*.exclude group: 'commons-logging', module: 'commons-logging'
+ all*.exclude group: 'commons-collections', module: 'commons-collections'
}
+apply from: 'gradle-javadoc.gradle'
+apply from: 'gradle-publish.gradle' \ No newline at end of file
diff --git a/platform/android/MapboxGLAndroidSDK/deploy.sh b/platform/android/MapboxGLAndroidSDK/deploy.sh
deleted file mode 100755
index c9392201e4..0000000000
--- a/platform/android/MapboxGLAndroidSDK/deploy.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env bash
-../gradlew -b build.gradle clean assembleRelease uploadArchives
diff --git a/platform/android/MapboxGLAndroidSDK/gradle-javadoc.gradle b/platform/android/MapboxGLAndroidSDK/gradle-javadoc.gradle
new file mode 100644
index 0000000000..00d96365ec
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/gradle-javadoc.gradle
@@ -0,0 +1,21 @@
+android.libraryVariants.all { variant ->
+ def name = variant.name
+ //noinspection GroovyAssignabilityCheck
+ task "javadoc$name"(type: Javadoc) {
+ description = "Generates javadoc for build $name"
+ failOnError = false
+ destinationDir = new File(destinationDir, variant.baseName)
+ source = files(variant.javaCompile.source)
+ classpath = files(variant.javaCompile.classpath.files) + files(android.bootClasspath)
+ options.windowTitle("Mapbox Android SDK $VERSION_NAME Reference")
+ options.docTitle("Mapbox Android SDK $VERSION_NAME")
+ options.header("Mapbox Android SDK $VERSION_NAME Reference")
+ options.bottom("&copy; 2015&ndash;2016 Mapbox. All rights reserved.")
+ options.links("http://docs.oracle.com/javase/7/docs/api/")
+ options.linksOffline("http://d.android.com/reference/", "$System.env.ANDROID_HOME/docs/reference")
+ options.overview("src/main/java/overview.html")
+ options.group("Mapbox Android SDK", "com.mapbox.*")
+ options.group("Third Party Libraries", "com.almeros.*")
+ exclude '**/R.java', '**/BuildConfig.java', 'com/almeros/**'
+ }
+} \ No newline at end of file
diff --git a/platform/android/MapboxGLAndroidSDK/gradle-publish.gradle b/platform/android/MapboxGLAndroidSDK/gradle-publish.gradle
new file mode 100644
index 0000000000..f017434fac
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/gradle-publish.gradle
@@ -0,0 +1,153 @@
+apply plugin: 'maven'
+apply plugin: 'signing'
+
+allprojects {
+ group project.GROUP
+ version project.VERSION_NAME
+
+ repositories {
+ mavenCentral()
+ }
+}
+
+repositories {
+ mavenCentral()
+}
+
+// From https://raw.github.com/mcxiaoke/gradle-mvn-push/master/jar.gradle
+android.libraryVariants.all { variant ->
+ def jarTask = project.tasks.create(name: "jar${variant.name.capitalize()}", type: Jar) {
+ from variant.javaCompile.destinationDir
+ exclude "**/R.class"
+ exclude "**/BuildConfig.class"
+ }
+ jarTask.dependsOn variant.javaCompile
+ artifacts.add('archives', jarTask);
+}
+
+// From https://raw.github.com/mcxiaoke/gradle-mvn-push/master/gradle-mvn-push.gradle
+def isReleaseBuild() {
+ return VERSION_NAME.contains("SNAPSHOT") == false
+}
+
+def getReleaseRepositoryUrl() {
+ return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL :
+ "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
+}
+
+def getSnapshotRepositoryUrl() {
+ return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL :
+ "https://oss.sonatype.org/content/repositories/snapshots/"
+}
+
+def getRepositoryUsername() {
+ return hasProperty('USERNAME') ? USERNAME :
+ (hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "")
+}
+
+def getRepositoryPassword() {
+ return hasProperty('PASSWORD') ? PASSWORD :
+ (hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "")
+}
+
+task apklib(type: Zip) {
+ appendix = extension = 'apklib'
+
+ from 'AndroidManifest.xml'
+ into('res') {
+ from 'res'
+ }
+ into('src') {
+ from 'src'
+ }
+}
+
+artifacts {
+ archives apklib
+}
+
+afterEvaluate { project ->
+ uploadArchives {
+ repositories {
+ mavenDeployer {
+ beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
+
+ pom.groupId = GROUP
+ pom.artifactId = POM_ARTIFACT_ID
+ pom.version = VERSION_NAME
+
+ repository(url: getReleaseRepositoryUrl()) {
+ authentication(userName: getRepositoryUsername(),
+ password: getRepositoryPassword())
+ }
+ snapshotRepository(url: getSnapshotRepositoryUrl()) {
+ authentication(userName: getRepositoryUsername(),
+ password: getRepositoryPassword())
+ }
+
+/*
+ // Leaving out as artifact was incorrectly named when found
+ addFilter('aar') { artifact, file ->
+ artifact.name == archivesBaseName
+ }
+ addFilter('apklib') { artifact, file ->
+ artifact.name == archivesBaseName + '-apklib'
+ }
+*/
+
+ pom.project {
+ name POM_NAME
+ packaging POM_PACKAGING
+ description POM_DESCRIPTION
+ url POM_URL
+
+ scm {
+ url POM_SCM_URL
+ connection POM_SCM_CONNECTION
+ developerConnection POM_SCM_DEV_CONNECTION
+ }
+
+ licenses {
+ license {
+ name POM_LICENCE_NAME
+ url POM_LICENCE_URL
+ distribution POM_LICENCE_DIST
+ }
+ }
+
+ developers {
+ developer {
+ id POM_DEVELOPER_ID
+ name POM_DEVELOPER_NAME
+ }
+ }
+ }
+ }
+ }
+ }
+
+ signing {
+ required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
+ sign configurations.archives
+ }
+
+ task androidJavadocs(type: Javadoc) {
+ source = android.sourceSets.main.java.sourceFiles
+ classpath = files(android.bootClasspath)
+ }
+
+ task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
+ classifier = 'javadoc'
+ from androidJavadocs.destinationDir
+ }
+
+ task androidSourcesJar(type: Jar) {
+ classifier = 'sources'
+ from android.sourceSets.main.java.sourceFiles
+ }
+
+ artifacts {
+ archives androidSourcesJar
+ archives androidJavadocsJar
+ }
+} \ No newline at end of file
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/build.gradle b/platform/android/MapboxGLAndroidSDKTestApp/build.gradle
index 80013ed291..46d1a13297 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/build.gradle
+++ b/platform/android/MapboxGLAndroidSDKTestApp/build.gradle
@@ -1,25 +1,4 @@
apply plugin: 'com.android.application'
-apply plugin: 'checkstyle'
-apply plugin: 'devicefarm'
-
-task accessToken {
- def tokenFile = new File("MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml")
- if (!tokenFile.exists()) {
- String tokenFileContents = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
- "<resources>\n" +
- " <string name=\"mapbox_access_token\">" + "$System.env.MAPBOX_ACCESS_TOKEN" + "</string>\n" +
- "</resources>"
-
- if (tokenFileContents == null) {
- throw new InvalidUserDataException("You must set the MAPBOX_ACCESS_TOKEN environment variable.")
- }
- tokenFile.write(tokenFileContents)
- }
-}
-
-gradle.projectsEvaluated {
- preBuild.dependsOn('accessToken')
-}
ext {
supportLibVersion = '25.0.0'
@@ -36,7 +15,6 @@ android {
versionCode 11
versionName "5.0.0"
- // Specify AndroidJUnitRunner as the default test instrumentation runner
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
@@ -64,7 +42,6 @@ android {
buildTypes {
debug {
- // run code coverage reports
testCoverageEnabled = true
}
release {
@@ -106,63 +83,9 @@ dependencies {
androidTestCompile 'com.squareup.spoon:spoon-client:1.6.2'
}
-checkstyle {
- configFile project.file('../checks.xml')
- showViolations true
-}
-
-def getAccessKeyDeviceFarm() {
- if (project.hasProperty('AWS_ACCESS_KEY_ID_DEVICE_FARM')) {
- return AWS_ACCESS_KEY_ID_DEVICE_FARM
- } else {
- println("Could not locate AWS_ACCESS_KEY_ID_DEVICE_FARM in gradle.properties")
- return ""
- }
-}
-
-def getSecretAccessKeyDeviceFarm() {
- if (project.hasProperty('AWS_SECRET_ACCESS_KEY_DEVICE_FARM')) {
- return AWS_SECRET_ACCESS_KEY_DEVICE_FARM
- } else {
- println("Could not locate AWS_SECRET_ACCESS_KEY_DEVICE_FARM in gradle.properties")
- return ""
- }
-}
-
-devicefarm {
-
- projectName "Mapbox GL Android" // required: Must already exists.
- devicePool "sanity" // optional: Defaults to "Top Devices"
-
- authentication {
- accessKey getAccessKeyDeviceFarm()
- secretKey getSecretAccessKeyDeviceFarm()
- }
-
- devicestate {
- wifi "on"
- bluetooth "off"
- gps "on"
- nfc "on"
- latitude 47.6204 // default
- longitude - 122.3491 // default
- }
-
- instrumentation {
-
- }
-}
-
-android.applicationVariants.all { variant ->
- def name = variant.buildType.name
- def checkstyle = project.tasks.create "checkstyle${name.capitalize()}", Checkstyle
- checkstyle.dependsOn variant.javaCompile
- checkstyle.source variant.javaCompile.source
- checkstyle.classpath = project.fileTree(variant.javaCompile.destinationDir)
- checkstyle.exclude('**/BuildConfig.java')
- checkstyle.exclude('**/R.java')
- project.tasks.getByName("check").dependsOn checkstyle
-}
-
+apply from: 'gradle-make.gradle'
+apply from: 'gradle-config.gradle'
+apply from: 'gradle-device-farm.gradle'
apply from: 'gradle-spoon.gradle'
+
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/gradle-config.gradle b/platform/android/MapboxGLAndroidSDKTestApp/gradle-config.gradle
new file mode 100644
index 0000000000..21da83c4a0
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/gradle-config.gradle
@@ -0,0 +1,22 @@
+//
+// Configuration file for gradle build execution.
+//
+
+task accessToken {
+ def tokenFile = new File("MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml")
+ if (!tokenFile.exists()) {
+ String tokenFileContents = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
+ "<resources>\n" +
+ " <string name=\"mapbox_access_token\">" + "$System.env.MAPBOX_ACCESS_TOKEN" + "</string>\n" +
+ "</resources>"
+
+ if (tokenFileContents == null) {
+ throw new InvalidUserDataException("You must set the MAPBOX_ACCESS_TOKEN environment variable.")
+ }
+ tokenFile.write(tokenFileContents)
+ }
+}
+
+gradle.projectsEvaluated {
+ preBuild.dependsOn('accessToken')
+} \ No newline at end of file
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/gradle-device-farm.gradle b/platform/android/MapboxGLAndroidSDKTestApp/gradle-device-farm.gradle
new file mode 100644
index 0000000000..f455e263c0
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/gradle-device-farm.gradle
@@ -0,0 +1,43 @@
+apply plugin: 'devicefarm'
+
+def getAccessKeyDeviceFarm() {
+ if (project.hasProperty('AWS_ACCESS_KEY_ID_DEVICE_FARM')) {
+ return AWS_ACCESS_KEY_ID_DEVICE_FARM
+ } else {
+ println("Could not locate AWS_ACCESS_KEY_ID_DEVICE_FARM in gradle.properties")
+ return ""
+ }
+}
+
+def getSecretAccessKeyDeviceFarm() {
+ if (project.hasProperty('AWS_SECRET_ACCESS_KEY_DEVICE_FARM')) {
+ return AWS_SECRET_ACCESS_KEY_DEVICE_FARM
+ } else {
+ println("Could not locate AWS_SECRET_ACCESS_KEY_DEVICE_FARM in gradle.properties")
+ return ""
+ }
+}
+
+devicefarm {
+
+ projectName "Mapbox GL Android" // required: Must already exists.
+ devicePool "sanity" // optional: Defaults to "Top Devices"
+
+ authentication {
+ accessKey getAccessKeyDeviceFarm()
+ secretKey getSecretAccessKeyDeviceFarm()
+ }
+
+ devicestate {
+ wifi "on"
+ bluetooth "off"
+ gps "on"
+ nfc "on"
+ latitude 47.6204 // default
+ longitude - 122.3491 // default
+ }
+
+ instrumentation {
+
+ }
+} \ No newline at end of file
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/gradle-make.gradle b/platform/android/MapboxGLAndroidSDKTestApp/gradle-make.gradle
new file mode 100644
index 0000000000..29567df6f0
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/gradle-make.gradle
@@ -0,0 +1,18 @@
+//
+// Contains GL-native make commands
+//
+
+task makeClean(type: Exec) {
+ workingDir '../../'
+ commandLine 'make', 'clean'
+}
+
+task makeAndroid(type: Exec) {
+ workingDir '../../'
+ commandLine 'make', 'android'
+}
+
+task makeAndroidAll(type: Exec) {
+ workingDir '../../'
+ commandLine 'make', 'apackage'
+} \ No newline at end of file
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/lint.xml b/platform/android/MapboxGLAndroidSDKTestApp/lint.xml
deleted file mode 100644
index 94058fd4df..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/lint.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<lint>
- <!-- Ignore errors caused by icon burning -->
- <issue id="IconLauncherShape" severity="ignore">
- <ignore path="res/drawable-mdpi/icon.png" />
- <ignore path="res/drawable-hdpi/icon.png" />
- <ignore path="res/drawable-xdpi/icon.png" />
- <ignore path="res/drawable-xxdpi/icon.png" />
- <ignore path="res/drawable-mdpi/icon_burned.png" />
- <ignore path="res/drawable-hdpi/icon_burned.png" />
- <ignore path="res/drawable-xdpi/icon_burned.png" />
- <ignore path="res/drawable-xxdpi/icon_burned.png" />
- </issue>
- <issue id="IconDuplicates" severity="ignore">
- <ignore path="res/drawable-mdpi/icon.png" />
- <ignore path="res/drawable-hdpi/icon.png" />
- <ignore path="res/drawable-xdpi/icon.png" />
- <ignore path="res/drawable-xxdpi/icon.png" />
- <ignore path="res/drawable-mdpi/icon_burned.png" />
- <ignore path="res/drawable-hdpi/icon_burned.png" />
- <ignore path="res/drawable-xdpi/icon_burned.png" />
- <ignore path="res/drawable-xxdpi/icon_burned.png" />
- </issue>
- <issue id="UnusedResources" severity="ignore">
- <ignore path="res/drawable-mdpi/icon.png" />
- <ignore path="res/drawable-hdpi/icon.png" />
- <ignore path="res/drawable-xdpi/icon.png" />
- <ignore path="res/drawable-xxdpi/icon.png" />
- <ignore path="res/drawable-mdpi/icon_burned.png" />
- <ignore path="res/drawable-hdpi/icon_burned.png" />
- <ignore path="res/drawable-xdpi/icon_burned.png" />
- <ignore path="res/drawable-xxdpi/icon_burned.png" />
- </issue>
-</lint>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/update_icons.sh b/platform/android/MapboxGLAndroidSDKTestApp/update_icons.sh
deleted file mode 100755
index ef5213d4f9..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/update_icons.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-if [[ -z `which iconoblast` ]]; then
- echo "Requires https://github.com/mapbox/iconoblast"
- exit 1
-fi
-
-commit=`git rev-parse --short HEAD`
-branch=`git rev-parse --abbrev-ref HEAD`
-repo=`git remote show origin | grep 'Fetch URL' | sed -e 's/.*github\.com:mapbox\///' -e 's/\.git$//' -e 's/^mapbox-//'`
-
-pwd=`pwd`
-cd src/main/res
-for folder in `find . -maxdepth 1 -type d -name drawable-\*`
-do
- cd ${folder}
- cp icon.png icon_burned.png
- iconoblast icon_burned.png $commit $branch $repo
- cd ..
-done
-cd ${pwd}
diff --git a/platform/android/MapboxGLAndroidSDKWearTestApp/build.gradle b/platform/android/MapboxGLAndroidSDKWearTestApp/build.gradle
index 6955fa5961..cf03539edb 100644
--- a/platform/android/MapboxGLAndroidSDKWearTestApp/build.gradle
+++ b/platform/android/MapboxGLAndroidSDKWearTestApp/build.gradle
@@ -1,24 +1,5 @@
apply plugin: 'com.android.application'
-task accessToken {
- def tokenFile = new File("MapboxGLAndroidSDKWearTestApp/src/main/res/values/developer-config.xml")
- if (!tokenFile.exists()) {
- String tokenFileContents = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
- "<resources>\n" +
- " <string name=\"mapbox_access_token\">" + "$System.env.MAPBOX_ACCESS_TOKEN" + "</string>\n" +
- "</resources>"
-
- if (tokenFileContents == null) {
- throw new InvalidUserDataException("You must set the MAPBOX_ACCESS_TOKEN environment variable.")
- }
- tokenFile.write(tokenFileContents)
- }
-}
-
-gradle.projectsEvaluated {
- preBuild.dependsOn('accessToken')
-}
-
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
@@ -44,14 +25,15 @@ dependencies {
transitive = true
}
+ // Wear
+ compile fileTree(dir: 'libs', include: ['*.jar'])
+ compile 'com.google.android.support:wearable:2.0.0-alpha3'
+ provided 'com.google.android.wearable:wearable:2.0.0-alpha3'
+
// Leak Canary
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
-
- compile fileTree(dir: 'libs', include: ['*.jar'])
- compile 'com.google.android.support:wearable:2.0.0-alpha3'
- provided 'com.google.android.wearable:wearable:2.0.0-alpha3'
}
-apply from: '../checkstyle.gradle' \ No newline at end of file
+apply from: 'gradle-config.gradle'
diff --git a/platform/android/MapboxGLAndroidSDKWearTestApp/gradle-config.gradle b/platform/android/MapboxGLAndroidSDKWearTestApp/gradle-config.gradle
new file mode 100644
index 0000000000..fac47cb2a9
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKWearTestApp/gradle-config.gradle
@@ -0,0 +1,22 @@
+//
+// Configuration file for gradle build execution.
+//
+
+task accessToken {
+ def tokenFile = new File("MapboxGLAndroidSDKWearTestApp/src/main/res/values/developer-config.xml")
+ if (!tokenFile.exists()) {
+ String tokenFileContents = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
+ "<resources>\n" +
+ " <string name=\"mapbox_access_token\">" + "$System.env.MAPBOX_ACCESS_TOKEN" + "</string>\n" +
+ "</resources>"
+
+ if (tokenFileContents == null) {
+ throw new InvalidUserDataException("You must set the MAPBOX_ACCESS_TOKEN environment variable.")
+ }
+ tokenFile.write(tokenFileContents)
+ }
+}
+
+gradle.projectsEvaluated {
+ preBuild.dependsOn('accessToken')
+} \ No newline at end of file
diff --git a/platform/android/build.gradle b/platform/android/build.gradle
index 2cd3b73074..88253321e7 100644
--- a/platform/android/build.gradle
+++ b/platform/android/build.gradle
@@ -17,8 +17,6 @@ allprojects {
}
}
-apply from: 'checkstyle.gradle'
-
task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
}
diff --git a/platform/android/checkstyle.gradle b/platform/android/checkstyle.gradle
deleted file mode 100644
index 69f7f41ff4..0000000000
--- a/platform/android/checkstyle.gradle
+++ /dev/null
@@ -1,16 +0,0 @@
-apply plugin: 'checkstyle'
-
-checkstyle.toolVersion = '7.1'
-
-task checkstyle(type: Checkstyle) {
- description 'Checks if the code adheres to coding standards'
- group 'verification'
-
- configFile = new File(rootDir, "checkstyle.xml")
- source 'src'
- include '**/*.java'
- exclude '**/gen/**'
-
- classpath = files()
- ignoreFailures = false
-}
diff --git a/platform/android/checkstyle.xml b/platform/android/checkstyle.xml
deleted file mode 100644
index 3b4fba7b2e..0000000000
--- a/platform/android/checkstyle.xml
+++ /dev/null
@@ -1,217 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE module PUBLIC
- "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
- "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
-
-<module name = "Checker">
- <property name="charset" value="UTF-8"/>
-
- <!-- <property name="severity" value="error"/> -->
- <property name="severity" value="warning"/>
-
- <property name="fileExtensions" value="java, properties, xml"/>
- <!-- Checks for whitespace -->
- <!-- See http://checkstyle.sf.net/config_whitespace.html -->
- <!-- <module name="FileTabCharacter">
- <property name="eachLine" value="true"/>
- </module> -->
-
- <!-- <module name="NewlineAtEndOfFile">
- <property name="lineSeparator" value="lf" />
- </module> -->
- <module name="FileLength"/>
- <module name="FileTabCharacter"/>
-
- <!-- Trailing spaces -->
- <module name="RegexpSingleline">
- <property name="format" value="\s+$"/>
- <property name="message" value="Line has trailing spaces."/>
- </module>
-
- <module name="TreeWalker">
- <module name="OuterTypeFilename"/>
- <module name="IllegalTokenText">
- <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
- <property name="format" value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
- <property name="message" value="Avoid using corresponding octal or Unicode escape."/>
- </module>
- <module name="AvoidEscapedUnicodeCharacters">
- <property name="allowEscapesForControlCharacters" value="true"/>
- <property name="allowByTailComment" value="true"/>
- <property name="allowNonPrintableEscapes" value="true"/>
- </module>
- <module name="LineLength">
- <property name="max" value="120"/>
- <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
- </module>
- <module name="OneTopLevelClass"/>
- <module name="NoLineWrap"/>
- <module name="EmptyBlock">
- <property name="option" value="TEXT"/>
- <property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
- </module>
- <module name="NeedBraces"/>
- <module name="LeftCurly">
- <property name="maxLineLength" value="120"/>
- </module>
- <module name="RightCurly"/>
- <module name="RightCurly">
- <property name="option" value="alone"/>
- <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
- </module>
- <module name="WhitespaceAround">
- <property name="allowEmptyConstructors" value="true"/>
- <property name="allowEmptyMethods" value="true"/>
- <property name="allowEmptyTypes" value="true"/>
- <property name="allowEmptyLoops" value="true"/>
- <message key="ws.notFollowed"
- value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
- <message key="ws.notPreceded"
- value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
- </module>
- <module name="OneStatementPerLine"/>
- <module name="MultipleVariableDeclarations"/>
- <module name="ArrayTypeStyle"/>
- <module name="MissingSwitchDefault"/>
- <module name="FallThrough"/>
- <module name="UpperEll"/>
- <module name="ModifierOrder"/>
- <module name="EmptyLineSeparator">
- <property name="allowNoEmptyLineBetweenFields" value="true"/>
- </module>
- <module name="SeparatorWrap">
- <property name="tokens" value="DOT"/>
- <property name="option" value="nl"/>
- </module>
- <module name="SeparatorWrap">
- <property name="tokens" value="COMMA"/>
- <property name="option" value="EOL"/>
- </module>
- <module name="PackageName">
- <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
- <message key="name.invalidPattern"
- value="Package name ''{0}'' must match pattern ''{1}''."/>
- </module>
- <module name="TypeName">
- <message key="name.invalidPattern"
- value="Type name ''{0}'' must match pattern ''{1}''."/>
- </module>
- <module name="MemberName">
- <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
- <message key="name.invalidPattern"
- value="Member name ''{0}'' must match pattern ''{1}''."/>
- </module>
- <module name="ParameterName">
- <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
- <message key="name.invalidPattern"
- value="Parameter name ''{0}'' must match pattern ''{1}''."/>
- </module>
- <module name="CatchParameterName">
- <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
- <message key="name.invalidPattern"
- value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
- </module>
- <module name="LocalVariableName">
- <property name="tokens" value="VARIABLE_DEF"/>
- <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
- <property name="allowOneCharVarInForLoop" value="true"/>
- <message key="name.invalidPattern"
- value="Local variable name ''{0}'' must match pattern ''{1}''."/>
- </module>
- <module name="ClassTypeParameterName">
- <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
- <message key="name.invalidPattern"
- value="Class type name ''{0}'' must match pattern ''{1}''."/>
- </module>
- <module name="MethodTypeParameterName">
- <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
- <message key="name.invalidPattern"
- value="Method type name ''{0}'' must match pattern ''{1}''."/>
- </module>
- <module name="InterfaceTypeParameterName">
- <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
- <message key="name.invalidPattern"
- value="Interface type name ''{0}'' must match pattern ''{1}''."/>
- </module>
- <module name="NoFinalizer"/>
- <module name="GenericWhitespace">
- <message key="ws.followed"
- value="GenericWhitespace ''{0}'' is followed by whitespace."/>
- <message key="ws.preceded"
- value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
- <message key="ws.illegalFollow"
- value="GenericWhitespace ''{0}'' should followed by whitespace."/>
- <message key="ws.notPreceded"
- value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
- </module>
- <module name="Indentation">
- <property name="basicOffset" value="2"/>
- <property name="braceAdjustment" value="0"/>
- <property name="caseIndent" value="2"/>
- <property name="throwsIndent" value="2"/>
- <property name="lineWrappingIndentation" value="2"/>
- <property name="arrayInitIndent" value="2"/>
- <!-- <property name="forceStrictCondition" value="true"/> -->
- </module>
- <module name="AbbreviationAsWordInName">
- <property name="ignoreFinal" value="false"/>
- <property name="allowedAbbreviationLength" value="1"/>
- </module>
- <module name="OverloadMethodsDeclarationOrder"/>
- <module name="VariableDeclarationUsageDistance"/>
- <module name="AvoidStarImport"/>
- <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
- <module name="RedundantImport"/>
- <module name="UnusedImports">
- <property name="processJavadoc" value="true"/>
- </module>
- <!-- <module name="CustomImportOrder">
- <property name="specialImportsRegExp" value="com.google"/>
- <property name="sortImportsInGroupAlphabetically" value="true"/>
- <property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
- </module> -->
- <module name="MethodParamPad"/>
- <module name="OperatorWrap">
- <property name="option" value="NL"/>
- <property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
- </module>
- <module name="AnnotationLocation">
- <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
- </module>
- <module name="AnnotationLocation">
- <property name="tokens" value="VARIABLE_DEF"/>
- <property name="allowSamelineMultipleAnnotations" value="true"/>
- </module>
- <module name="NonEmptyAtclauseDescription"/>
- <!-- <module name="JavadocTagContinuationIndentation"/> -->
- <!-- <module name="SummaryJavadoc">
- <property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
- </module>
- <module name="JavadocParagraph"/> -->
- <module name="AtclauseOrder">
- <property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
- <property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
- </module>
- <!-- <module name="JavadocMethod">
- <property name="scope" value="public"/>
- <property name="allowMissingParamTags" value="true"/>
- <property name="allowMissingThrowsTags" value="true"/>
- <property name="allowMissingReturnTag" value="true"/>
- <property name="minLineCount" value="2"/>
- <property name="allowedAnnotations" value="Override, Test"/>
- <property name="allowThrowsTagsForSubclasses" value="true"/>
- </module> -->
- <module name="MethodName">
- <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
- <message key="name.invalidPattern"
- value="Method name ''{0}'' must match pattern ''{1}''."/>
- </module>
- <!-- <module name="SingleLineJavadoc">
- <property name="ignoreInlineTags" value="false"/>
- </module> -->
- <module name="EmptyCatchBlock">
- <property name="exceptionVariableName" value="expected"/>
- </module>
- <module name="CommentsIndentation"/>
- </module>
-</module>