|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
task wrapper(type: Wrapper) {
|
|
|
|
gradleVersion = '2.2.1'
|
|
|
|
}
|
|
|
|
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath 'com.android.tools.build:gradle:1.5.0'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
lintOptions {
|
|
|
|
lintConfig file("lint.xml")
|
|
|
|
}
|
|
|
|
|
|
|
|
compileSdkVersion 23
|
|
|
|
buildToolsVersion "23.0.2"
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
versionCode 379
|
|
|
|
versionName "4.7.22"
|
|
|
|
minSdkVersion 9
|
|
|
|
targetSdkVersion 23
|
|
|
|
}
|
|
|
|
|
|
|
|
signingConfigs {
|
|
|
|
release
|
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_7
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_7
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
debug {
|
|
|
|
testCoverageEnabled true
|
|
|
|
}
|
|
|
|
release {
|
|
|
|
minifyEnabled true
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.txt'
|
|
|
|
signingConfig signingConfigs.release
|
|
|
|
}
|
|
|
|
// https://code.google.com/p/android/issues/detail?id=123771
|
|
|
|
debuggable.initWith(buildTypes.debug)
|
|
|
|
debuggable {
|
|
|
|
testCoverageEnabled false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (project.hasProperty('keyAlias') &&
|
|
|
|
project.hasProperty('storeFile') &&
|
|
|
|
project.hasProperty('storePassword') &&
|
|
|
|
project.hasProperty('keyPassword')) {
|
|
|
|
android.signingConfigs.release.keyAlias = keyAlias
|
|
|
|
android.signingConfigs.release.storeFile = file(storeFile)
|
|
|
|
android.signingConfigs.release.storePassword = storePassword
|
|
|
|
android.signingConfigs.release.keyPassword = keyPassword
|
|
|
|
} else {
|
|
|
|
buildTypes.release.signingConfig = null
|
|
|
|
}
|
|
|
|
|
|
|
|
productFlavors {
|
|
|
|
generic
|
|
|
|
googleplay
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
android.applicationVariants.all { variant ->
|
|
|
|
variant.mergeResources.doLast {
|
|
|
|
if (project.hasProperty('gapiKey')) {
|
|
|
|
File values = file("${buildDir}/intermediates/res/merged/${variant.dirName}/values/values.xml")
|
|
|
|
values.write(
|
|
|
|
values.getText('UTF-8').replaceAll(/<string name="gapi_key">.*<\/string>/, "<string name=\"gapi_key\">${project.property('gapiKey')}</string>"),
|
|
|
|
'UTF-8')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
provided group: 'com.squareup.dagger', name: 'dagger-compiler', version: '1.2.2'
|
|
|
|
compile group: 'com.squareup.dagger', name: 'dagger', version: '1.2.2'
|
|
|
|
|
|
|
|
compile group: 'com.jakewharton', name: 'butterknife', version: '7.0.1'
|
|
|
|
|
|
|
|
compile group: 'com.android.support', name: 'design', version: '23.1.1'
|
|
|
|
|
|
|
|
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.7'
|
|
|
|
|
|
|
|
compile group: 'com.rubiconproject.oss', name: 'jchronic', version: '0.2.6', transitive: false
|
|
|
|
compile group: 'org.scala-saddle', name: 'google-rfc-2445', version: '20110304', transitive: false
|
|
|
|
|
|
|
|
compile (group: 'com.github.flavienlaurent.datetimepicker', name: 'library', version: '0.0.2') {
|
|
|
|
exclude group: 'com.android.support', module: 'support-v4'
|
|
|
|
}
|
|
|
|
|
|
|
|
googleplayCompile group: 'com.google.android.gms', name: 'play-services-location', version: '8.3.0'
|
|
|
|
|
|
|
|
googleplayCompile(group: 'com.google.apis', name: 'google-api-services-tasks', version: 'v1-rev41-1.21.0') {
|
|
|
|
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
|
|
|
|
}
|
|
|
|
googleplayCompile(group: 'com.google.api-client', name: 'google-api-client-android', version: '1.21.0') {
|
|
|
|
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
|
|
|
|
}
|
|
|
|
|
|
|
|
compile group: 'com.google.guava', name: 'guava-jdk5', version: '13.0'
|
|
|
|
|
|
|
|
compile group: 'com.github.tony19', name: 'logback-android-classic', version: '1.1.1-2'
|
|
|
|
apk group: 'com.github.tony19', name: 'logback-android-core', version: '1.1.1-2'
|
|
|
|
|
|
|
|
androidTestCompile group: 'org.mockito', name: 'mockito-core', version: '1.9.5', transitive: false
|
|
|
|
androidTestCompile group: 'com.google.dexmaker', name: 'dexmaker', version: '1.1'
|
|
|
|
androidTestCompile group: 'com.google.dexmaker', name: 'dexmaker-mockito', version: '1.1'
|
|
|
|
androidTestCompile group: 'com.natpryce', name: 'make-it-easy', version: '3.1.0', transitive: false
|
|
|
|
}
|