PassAndroid/build.gradle
2014-08-24 13:18:09 +02:00

147 lines
3.8 KiB
Groovy

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
classpath 'com.stanfy.spoon:spoon-gradle-plugin:0.10.0'
}
}
apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
apply plugin: 'spoon'
repositories {
jcenter()
}
android {
flavorDimensions "maps", "analytics", "distribution"
productFlavors {
withMaps {
flavorDimension "maps"
}
noMaps {
flavorDimension "maps"
}
withAnalytics {
flavorDimension "analytics"
}
noAnalytics {
flavorDimension "analytics"
}
forFDroid {
flavorDimension "distribution"
}
forPlay {
flavorDimension "distribution"
}
}
// https://groups.google.com/forum/#!topic/adt-dev/-Km7VgExKf4
useOldManifestMerger true
}
dependencies {
androidTestCompile('com.jakewharton.espresso:espresso:1.1-r3') {
exclude group: 'com.android.support'
exclude group: 'com.google.guava'
}
androidTestCompile('com.jakewharton.espresso:espresso-support-v4:1.1-r3') {
exclude group: 'com.android.support'
exclude group: 'com.google.guava'
}
androidTestCompile 'com.squareup.spoon:spoon-client:1.1.1'
androidTestCompile 'com.squareup:fest-android:1.0.7'
androidTestCompile 'org.mockito:mockito-core:1.9.5'
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.0'
// The Apache Software License, Version 2.0
compile 'com.googlecode.android-query:android-query:0.25.9'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.android.support:support-v4:20.0.0'
compile 'net.lingala.zip4j:zip4j:1.3.2'
compile 'com.android.support:appcompat-v7:20.0.0'
compile 'com.jakewharton:butterknife:5.1.2'
compile 'joda-time:joda-time:2.3'
compile 'com.squareup:otto:1.3.5'
compile 'org.ligi:AXT:0.31'
compile 'org.ligi:tracedroid:1.2'
compile 'com.google.guava:guava:17.0'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile 'fr.nicolaspomepuy:discreetapprate:2.0.2@aar'
// cannot use this new version: https://github.com/zxing/zxing/issues/165
// WARNING: might work on some devices or the emulator - but fails on others
// compile 'com.google.zxing:core:3.1.0'
compile fileTree(dir: 'libs', include: 'zxing-core-2.3.0-SNAPSHOT.jar')
def play_services = 'com.google.android.gms:play-services:5.0.89'
withAnalyticsCompile play_services
withMapsCompile play_services
}
android {
compileSdkVersion 20
buildToolsVersion "20"
defaultConfig {
versionCode 232
versionName "2.3.2"
minSdkVersion 9
targetSdkVersion 20
applicationId "org.ligi.passandroid"
testInstrumentationRunner "com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner"
}
buildTypes {
release {
runProguard false
proguardFile 'proguard-project.txt'
applicationVariants.all { variant ->
def file = variant.outputFile
variant.outputFile = new File(file.parent, file.name.replace(".apk", "-" + defaultConfig.versionName + ".apk"))
}
}
debug {
//makes problems
//testCoverageEnabled true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
lintOptions {
abortOnError false
disable "MissingTranslation"
}
// hack for instrumentation testing :-(
packagingOptions {
exclude 'LICENSE.txt'
}
}