blob: 6647b446197dd738a818da03b223bb959de01f35 [file] [log] [blame]
Adrien Béraudb00ed3f2015-06-07 15:36:06 -04001apply plugin: 'com.android.application'
2
Pierre Ducheminb5317682017-12-27 16:38:12 -05003def android_support_version = "27.0.2"
4def butterknife_version = "8.8.1"
5def dagger_version = "2.12"
Romain Bertozzi2b2aa6f2016-04-28 11:18:57 -04006
Adrien Béraudb00ed3f2015-06-07 15:36:06 -04007dependencies {
Pierre Ducheminb5317682017-12-27 16:38:12 -05008 implementation fileTree(include: '*.jar', dir: 'libs')
9 implementation project(':libringclient')
Alexandre Lision5da46fa2017-08-09 10:25:50 -040010
Pierre Ducheminb5317682017-12-27 16:38:12 -050011 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 Duchemin8b715f82018-01-09 11:53:40 -050018 implementation "com.android.support:preference-leanback-v17:$android_support_version"
Alexandre Lision5da46fa2017-08-09 10:25:50 -040019
Romain Bertozzi64a66782016-08-02 12:10:38 -040020 // ORM
Pierre Ducheminb5317682017-12-27 16:38:12 -050021 implementation 'com.j256.ormlite:ormlite-android:4.48'
Alexandre Lision5da46fa2017-08-09 10:25:50 -040022
Romain Bertozzi64a66782016-08-02 12:10:38 -040023 // Barcode scanning
Pierre Ducheminb5317682017-12-27 16:38:12 -050024 implementation 'com.journeyapps:zxing-android-embedded:3.5.0@aar'
Alexandre Lision5da46fa2017-08-09 10:25:50 -040025
Romain Bertozzi64a66782016-08-02 12:10:38 -040026 // Butterknife
Pierre Ducheminb5317682017-12-27 16:38:12 -050027 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 Lision5da46fa2017-08-09 10:25:50 -040031
Thibault Wittemberg55030872016-11-08 10:55:54 -050032 // Dagger dependency injection
Pierre Ducheminb5317682017-12-27 16:38:12 -050033 compile "com.google.dagger:dagger:$dagger_version"
34 annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"
Thibault Wittemberg55030872016-11-08 10:55:54 -050035 provided 'javax.annotation:jsr250-api:1.0'
Alexandre Lision5da46fa2017-08-09 10:25:50 -040036
Hadrien De Sousa84ab2d22017-03-16 15:45:52 -040037 // Glide
Pierre Ducheminb5317682017-12-27 16:38:12 -050038 implementation 'com.github.bumptech.glide:glide:3.8.0'
Hadrien De Sousa0dc83162017-11-10 16:15:18 -050039
40 // RxAndroid
Pierre Ducheminb5317682017-12-27 16:38:12 -050041 implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
Adrien Béraudb00ed3f2015-06-07 15:36:06 -040042}
43
44android {
Adrien Béraud4bb26e02018-01-13 21:08:59 -050045 compileSdkVersion 27
46 buildToolsVersion "26.0.3"
Adrien Béraudf79762c2016-08-29 18:04:33 -040047
48 defaultConfig {
Alexandre Lisionfed74d72017-08-09 10:59:40 -040049 minSdkVersion 18
Adrien Béraud4bb26e02018-01-13 21:08:59 -050050 targetSdkVersion 27
Pierre Duchemina5529292017-12-18 17:25:54 -050051 vectorDrawables.useSupportLibrary = true
Adrien Béraudf79762c2016-08-29 18:04:33 -040052 }
53
Adrien Béraudb00ed3f2015-06-07 15:36:06 -040054 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éraudb179bab2015-10-08 12:04:22 -040073 compileOptions {
Pierre Duchemin45707ca2018-01-15 15:05:23 -050074 sourceCompatibility JavaVersion.VERSION_1_8
75 targetCompatibility JavaVersion.VERSION_1_8
Adrien Béraudb179bab2015-10-08 12:04:22 -040076 }
Adrien Béraud12b8ddc2015-11-19 14:09:33 -050077 buildTypes {
78 release {
79 minifyEnabled true
Adrien Béraudcf2225d2015-11-21 20:54:14 -050080 proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
Adrien Béraud12b8ddc2015-11-19 14:09:33 -050081 }
82 }
83 signingConfigs {
84 config {
85 keyAlias 'ring'
86 storeFile file('../keystore.bin')
87 }
88 }
89 lintOptions {
90 disable 'MissingTranslation'
91 }
Romain Bertozzi197c8c82016-04-04 14:18:11 -040092 splits {
93 abi {
94 enable true
95 reset()
96 def sp = archs.split(',')
97 include(sp)
98 universalApk true
Thibault Wittemberg66a00222016-11-07 17:08:47 -050099 }
Romain Bertozzi197c8c82016-04-04 14:18:11 -0400100 }
Romain Bertozzi197c8c82016-04-04 14:18:11 -0400101}