Adrien Béraud | b00ed3f | 2015-06-07 15:36:06 -0400 | [diff] [blame] | 1 | apply plugin: 'com.android.application' |
| 2 | |
Adrien Béraud | 0e0feef | 2018-02-13 16:32:06 +0100 | [diff] [blame] | 3 | def buildFirebase = project.hasProperty('buildFirebase') |
| 4 | |
| 5 | android { |
| 6 | compileSdkVersion 27 |
Pierre Duchemin | 2b2a9ff | 2018-02-20 11:21:02 -0500 | [diff] [blame] | 7 | buildToolsVersion '27.0.3' |
Adrien Béraud | 0e0feef | 2018-02-13 16:32:06 +0100 | [diff] [blame] | 8 | defaultConfig { |
Adrien Béraud | 3de26d5 | 2018-03-10 16:10:02 -0500 | [diff] [blame] | 9 | minSdkVersion 19 |
Adrien Béraud | 0e0feef | 2018-02-13 16:32:06 +0100 | [diff] [blame] | 10 | targetSdkVersion 27 |
Adrien Béraud | 90b95bf | 2018-05-01 16:39:42 -0400 | [diff] [blame] | 11 | versionCode 117 |
| 12 | versionName "20180501" |
Adrien Béraud | 0e0feef | 2018-02-13 16:32:06 +0100 | [diff] [blame] | 13 | vectorDrawables.useSupportLibrary = true |
| 14 | } |
| 15 | |
| 16 | sourceSets { |
| 17 | main { |
| 18 | aidl.srcDirs = ['src/main/java'] |
| 19 | jniLibs.srcDir 'src/main/libs' |
| 20 | jni.srcDirs = [] |
| 21 | } |
| 22 | |
Adrien Béraud | 0e0feef | 2018-02-13 16:32:06 +0100 | [diff] [blame] | 23 | // Move the build types to build-types/<type> |
| 24 | // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... |
| 25 | // This moves them out of them default location under src/<type>/... which would |
| 26 | // conflict with src/ being used by the main source set. |
| 27 | // Adding new build types or product flavors should be accompanied |
| 28 | // by a similar customization. |
| 29 | debug.setRoot('build-types/debug') |
| 30 | release.setRoot('build-types/release') |
| 31 | } |
| 32 | compileOptions { |
| 33 | sourceCompatibility JavaVersion.VERSION_1_8 |
| 34 | targetCompatibility JavaVersion.VERSION_1_8 |
| 35 | } |
| 36 | buildTypes { |
Adrien Béraud | cad9db8 | 2018-04-21 21:00:41 -0400 | [diff] [blame] | 37 | debug { |
| 38 | minifyEnabled true |
| 39 | debuggable true |
| 40 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 41 | } |
Adrien Béraud | 0e0feef | 2018-02-13 16:32:06 +0100 | [diff] [blame] | 42 | release { |
| 43 | minifyEnabled true |
| 44 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
| 45 | } |
| 46 | } |
| 47 | flavorDimensions "push" |
| 48 | productFlavors { |
| 49 | noPush { |
| 50 | dimension "push" |
| 51 | } |
| 52 | withFirebase { |
| 53 | dimension "push" |
| 54 | } |
| 55 | } |
| 56 | signingConfigs { |
| 57 | config { |
| 58 | keyAlias 'ring' |
| 59 | storeFile file('../keystore.bin') |
| 60 | } |
| 61 | } |
| 62 | lintOptions { |
| 63 | disable 'MissingTranslation' |
| 64 | } |
| 65 | splits { |
| 66 | abi { |
| 67 | enable true |
| 68 | reset() |
| 69 | def sp = archs.split(',') |
| 70 | include(sp) |
| 71 | universalApk true |
| 72 | } |
| 73 | } |
| 74 | } |
Romain Bertozzi | 2b2aa6f | 2016-04-28 11:18:57 -0400 | [diff] [blame] | 75 | |
Adrien Béraud | b00ed3f | 2015-06-07 15:36:06 -0400 | [diff] [blame] | 76 | dependencies { |
Adrien Béraud | 5f51c72 | 2018-04-06 00:54:31 -0400 | [diff] [blame] | 77 | def android_support_version = "27.1.1" |
Pierre Duchemin | 511775d | 2018-02-15 16:11:38 -0500 | [diff] [blame] | 78 | def butterknife_version = "8.8.1" |
| 79 | def dagger_version = "2.12" |
| 80 | |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 81 | implementation fileTree(include: '*.jar', dir: 'libs') |
| 82 | implementation project(':libringclient') |
Alexandre Lision | 5da46fa | 2017-08-09 10:25:50 -0400 | [diff] [blame] | 83 | |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 84 | implementation "com.android.support:support-v13:$android_support_version" |
| 85 | implementation "com.android.support:design:$android_support_version" |
| 86 | implementation "com.android.support:cardview-v7:$android_support_version" |
| 87 | implementation "com.android.support:preference-v14:$android_support_version" |
| 88 | implementation "com.android.support:recyclerview-v7:$android_support_version" |
| 89 | implementation "com.android.support:appcompat-v7:$android_support_version" |
| 90 | implementation "com.android.support:leanback-v17:$android_support_version" |
Pierre Duchemin | 8b715f8 | 2018-01-09 11:53:40 -0500 | [diff] [blame] | 91 | implementation "com.android.support:preference-leanback-v17:$android_support_version" |
Alexandre Lision | 5da46fa | 2017-08-09 10:25:50 -0400 | [diff] [blame] | 92 | |
Romain Bertozzi | 64a6678 | 2016-08-02 12:10:38 -0400 | [diff] [blame] | 93 | // ORM |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 94 | implementation 'com.j256.ormlite:ormlite-android:4.48' |
Alexandre Lision | 5da46fa | 2017-08-09 10:25:50 -0400 | [diff] [blame] | 95 | |
Romain Bertozzi | 64a6678 | 2016-08-02 12:10:38 -0400 | [diff] [blame] | 96 | // Barcode scanning |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 97 | implementation 'com.journeyapps:zxing-android-embedded:3.5.0@aar' |
Alexandre Lision | 5da46fa | 2017-08-09 10:25:50 -0400 | [diff] [blame] | 98 | |
Romain Bertozzi | 64a6678 | 2016-08-02 12:10:38 -0400 | [diff] [blame] | 99 | // Butterknife |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 100 | implementation "com.jakewharton:butterknife:$butterknife_version" |
| 101 | annotationProcessor "com.jakewharton:butterknife-compiler:$butterknife_version" |
| 102 | |
Pierre Duchemin | bb83367 | 2018-03-09 16:18:33 -0500 | [diff] [blame] | 103 | implementation 'com.rodolfonavalon:ShapeRippleLibrary:1.0.0' |
Alexandre Lision | 5da46fa | 2017-08-09 10:25:50 -0400 | [diff] [blame] | 104 | |
Thibault Wittemberg | 5503087 | 2016-11-08 10:55:54 -0500 | [diff] [blame] | 105 | // Dagger dependency injection |
Pierre Duchemin | 511775d | 2018-02-15 16:11:38 -0500 | [diff] [blame] | 106 | implementation "com.google.dagger:dagger:$dagger_version" |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 107 | annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version" |
Alexandre Lision | 5da46fa | 2017-08-09 10:25:50 -0400 | [diff] [blame] | 108 | |
Hadrien De Sousa | 84ab2d2 | 2017-03-16 15:45:52 -0400 | [diff] [blame] | 109 | // Glide |
Adrien Béraud | 576f6b1 | 2018-05-09 17:01:21 -0400 | [diff] [blame^] | 110 | implementation 'com.github.bumptech.glide:glide:4.7.1' |
| 111 | annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1' |
Hadrien De Sousa | 0dc8316 | 2017-11-10 16:15:18 -0500 | [diff] [blame] | 112 | |
| 113 | // RxAndroid |
Pierre Duchemin | 2b2a9ff | 2018-02-20 11:21:02 -0500 | [diff] [blame] | 114 | implementation 'io.reactivex.rxjava2:rxandroid:2.0.2' |
Adrien Béraud | 0cfb6c8 | 2018-01-24 13:01:23 -0500 | [diff] [blame] | 115 | |
Adrien Béraud | 6453872 | 2018-03-15 17:34:00 -0400 | [diff] [blame] | 116 | implementation 'com.jsibbold:zoomage:1.1.0' |
| 117 | |
Adrien Béraud | 576f6b1 | 2018-05-09 17:01:21 -0400 | [diff] [blame^] | 118 | withFirebaseImplementation 'com.google.firebase:firebase-messaging:15.0.2' |
Adrien Béraud | b00ed3f | 2015-06-07 15:36:06 -0400 | [diff] [blame] | 119 | } |
| 120 | |
Adrien Béraud | 0e0feef | 2018-02-13 16:32:06 +0100 | [diff] [blame] | 121 | if (buildFirebase) { |
| 122 | println 'apply plugin ' + buildFirebase |
Adrien Béraud | 0cfb6c8 | 2018-01-24 13:01:23 -0500 | [diff] [blame] | 123 | apply plugin: 'com.google.gms.google-services' |
| 124 | } |