* [android] update to mas 2.0-beta2 and handle dependencies consistenly * extract remaining dependencies and bump stable versions
78 lines
2.0 KiB
Groovy
78 lines
2.0 KiB
Groovy
apply plugin: 'com.android.library'
|
|
|
|
dependencies {
|
|
compile "com.android.support:support-annotations:${supportLibVersion}"
|
|
compile "com.android.support:support-v4:${supportLibVersion}"
|
|
compile "com.android.support:design:${supportLibVersion}"
|
|
compile rootProject.ext.dep.timber
|
|
compile rootProject.ext.dep.okhttp3
|
|
compile rootProject.ext.dep.lost
|
|
|
|
// Mapbox Android Services (GeoJSON support)
|
|
compile(rootProject.ext.dep.mapboxJavaGeoJSON) {
|
|
transitive = true
|
|
}
|
|
|
|
// Mapbox Android Services (Telemetry support)
|
|
compile(rootProject.ext.dep.mapboxAndroidTelemetry) {
|
|
transitive = true
|
|
}
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
buildToolsVersion rootProject.ext.buildToolsVersion
|
|
|
|
defaultConfig {
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
buildConfigField "String", "GIT_REVISION_SHORT", String.format("\"%s\"", getGitRevision())
|
|
}
|
|
|
|
// avoid naming conflicts, force usage of prefix
|
|
resourcePrefix 'mapbox_'
|
|
|
|
sourceSets {
|
|
// limit amount of exposed library resources
|
|
main.res.srcDirs += 'src/main/res-public'
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_7
|
|
targetCompatibility JavaVersion.VERSION_1_7
|
|
}
|
|
|
|
lintOptions {
|
|
checkAllWarnings true
|
|
warningsAsErrors true
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
jniDebuggable true
|
|
}
|
|
|
|
release {
|
|
// aar proguard configuration
|
|
consumerProguardFiles 'proguard-rules.pro'
|
|
jniDebuggable false
|
|
}
|
|
}
|
|
}
|
|
|
|
def getGitRevision() {
|
|
def cmd = "git rev-parse --short HEAD"
|
|
def proc = cmd.execute()
|
|
def ref = proc.text.trim()
|
|
return ref
|
|
}
|
|
|
|
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'
|
|
apply from: 'gradle-checkstyle.gradle'
|