Adrien Béraud | b00ed3f | 2015-06-07 15:36:06 -0400 | [diff] [blame] | 1 | apply plugin: 'com.android.application' |
| 2 | |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 3 | def android_support_version = "27.0.2" |
| 4 | def butterknife_version = "8.8.1" |
| 5 | def dagger_version = "2.12" |
Romain Bertozzi | 2b2aa6f | 2016-04-28 11:18:57 -0400 | [diff] [blame] | 6 | |
Adrien Béraud | b00ed3f | 2015-06-07 15:36:06 -0400 | [diff] [blame] | 7 | dependencies { |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 8 | implementation fileTree(include: '*.jar', dir: 'libs') |
| 9 | implementation project(':libringclient') |
Alexandre Lision | 5da46fa | 2017-08-09 10:25:50 -0400 | [diff] [blame] | 10 | |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 11 | implementation "com.android.support:support-v13:$android_support_version" |
| 12 | implementation "com.android.support:design:$android_support_version" |
| 13 | implementation "com.android.support:cardview-v7:$android_support_version" |
| 14 | implementation "com.android.support:preference-v14:$android_support_version" |
| 15 | implementation "com.android.support:recyclerview-v7:$android_support_version" |
| 16 | implementation "com.android.support:appcompat-v7:$android_support_version" |
| 17 | implementation "com.android.support:leanback-v17:$android_support_version" |
Pierre Duchemin | 8b715f8 | 2018-01-09 11:53:40 -0500 | [diff] [blame] | 18 | implementation "com.android.support:preference-leanback-v17:$android_support_version" |
Alexandre Lision | 5da46fa | 2017-08-09 10:25:50 -0400 | [diff] [blame] | 19 | |
Romain Bertozzi | 64a6678 | 2016-08-02 12:10:38 -0400 | [diff] [blame] | 20 | // ORM |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 21 | implementation 'com.j256.ormlite:ormlite-android:4.48' |
Alexandre Lision | 5da46fa | 2017-08-09 10:25:50 -0400 | [diff] [blame] | 22 | |
Romain Bertozzi | 64a6678 | 2016-08-02 12:10:38 -0400 | [diff] [blame] | 23 | // Barcode scanning |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 24 | implementation 'com.journeyapps:zxing-android-embedded:3.5.0@aar' |
Alexandre Lision | 5da46fa | 2017-08-09 10:25:50 -0400 | [diff] [blame] | 25 | |
Romain Bertozzi | 64a6678 | 2016-08-02 12:10:38 -0400 | [diff] [blame] | 26 | // Butterknife |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 27 | implementation "com.jakewharton:butterknife:$butterknife_version" |
| 28 | annotationProcessor "com.jakewharton:butterknife-compiler:$butterknife_version" |
| 29 | |
| 30 | implementation 'com.skyfishjy.ripplebackground:library:1.0.1' |
Alexandre Lision | 5da46fa | 2017-08-09 10:25:50 -0400 | [diff] [blame] | 31 | |
Thibault Wittemberg | 5503087 | 2016-11-08 10:55:54 -0500 | [diff] [blame] | 32 | // Dagger dependency injection |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 33 | compile "com.google.dagger:dagger:$dagger_version" |
| 34 | annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version" |
Thibault Wittemberg | 5503087 | 2016-11-08 10:55:54 -0500 | [diff] [blame] | 35 | provided 'javax.annotation:jsr250-api:1.0' |
Alexandre Lision | 5da46fa | 2017-08-09 10:25:50 -0400 | [diff] [blame] | 36 | |
Hadrien De Sousa | 84ab2d2 | 2017-03-16 15:45:52 -0400 | [diff] [blame] | 37 | // Glide |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 38 | implementation 'com.github.bumptech.glide:glide:3.8.0' |
Hadrien De Sousa | 0dc8316 | 2017-11-10 16:15:18 -0500 | [diff] [blame] | 39 | |
| 40 | // RxAndroid |
Pierre Duchemin | b531768 | 2017-12-27 16:38:12 -0500 | [diff] [blame] | 41 | implementation 'io.reactivex.rxjava2:rxandroid:2.0.1' |
Adrien Béraud | b00ed3f | 2015-06-07 15:36:06 -0400 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | android { |
Adrien Béraud | 4bb26e0 | 2018-01-13 21:08:59 -0500 | [diff] [blame] | 45 | compileSdkVersion 27 |
| 46 | buildToolsVersion "26.0.3" |
Adrien Béraud | f79762c | 2016-08-29 18:04:33 -0400 | [diff] [blame] | 47 | |
| 48 | defaultConfig { |
Alexandre Lision | fed74d7 | 2017-08-09 10:59:40 -0400 | [diff] [blame] | 49 | minSdkVersion 18 |
Adrien Béraud | 4bb26e0 | 2018-01-13 21:08:59 -0500 | [diff] [blame] | 50 | targetSdkVersion 27 |
Pierre Duchemin | a552929 | 2017-12-18 17:25:54 -0500 | [diff] [blame] | 51 | vectorDrawables.useSupportLibrary = true |
Adrien Béraud | f79762c | 2016-08-29 18:04:33 -0400 | [diff] [blame] | 52 | } |
| 53 | |
Adrien Béraud | b00ed3f | 2015-06-07 15:36:06 -0400 | [diff] [blame] | 54 | sourceSets { |
| 55 | main { |
| 56 | aidl.srcDirs = ['src/main/java'] |
| 57 | jniLibs.srcDir 'src/main/libs' |
| 58 | jni.srcDirs = [] |
| 59 | } |
| 60 | |
| 61 | // Move the tests to tests/java, tests/res, etc... |
| 62 | instrumentTest.setRoot('tests') |
| 63 | |
| 64 | // Move the build types to build-types/<type> |
| 65 | // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... |
| 66 | // This moves them out of them default location under src/<type>/... which would |
| 67 | // conflict with src/ being used by the main source set. |
| 68 | // Adding new build types or product flavors should be accompanied |
| 69 | // by a similar customization. |
| 70 | debug.setRoot('build-types/debug') |
| 71 | release.setRoot('build-types/release') |
| 72 | } |
Adrien Béraud | b179bab | 2015-10-08 12:04:22 -0400 | [diff] [blame] | 73 | compileOptions { |
Pierre Duchemin | 45707ca | 2018-01-15 15:05:23 -0500 | [diff] [blame^] | 74 | sourceCompatibility JavaVersion.VERSION_1_8 |
| 75 | targetCompatibility JavaVersion.VERSION_1_8 |
Adrien Béraud | b179bab | 2015-10-08 12:04:22 -0400 | [diff] [blame] | 76 | } |
Adrien Béraud | 12b8ddc | 2015-11-19 14:09:33 -0500 | [diff] [blame] | 77 | buildTypes { |
| 78 | release { |
| 79 | minifyEnabled true |
Adrien Béraud | cf2225d | 2015-11-21 20:54:14 -0500 | [diff] [blame] | 80 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
Adrien Béraud | 12b8ddc | 2015-11-19 14:09:33 -0500 | [diff] [blame] | 81 | } |
| 82 | } |
| 83 | signingConfigs { |
| 84 | config { |
| 85 | keyAlias 'ring' |
| 86 | storeFile file('../keystore.bin') |
| 87 | } |
| 88 | } |
| 89 | lintOptions { |
| 90 | disable 'MissingTranslation' |
| 91 | } |
Romain Bertozzi | 197c8c8 | 2016-04-04 14:18:11 -0400 | [diff] [blame] | 92 | splits { |
| 93 | abi { |
| 94 | enable true |
| 95 | reset() |
| 96 | def sp = archs.split(',') |
| 97 | include(sp) |
| 98 | universalApk true |
Thibault Wittemberg | 66a0022 | 2016-11-07 17:08:47 -0500 | [diff] [blame] | 99 | } |
Romain Bertozzi | 197c8c8 | 2016-04-04 14:18:11 -0400 | [diff] [blame] | 100 | } |
Romain Bertozzi | 197c8c8 | 2016-04-04 14:18:11 -0400 | [diff] [blame] | 101 | } |