blob: 25f82deb1e14700a68f4b4cf62155e2de2a1b16c [file] [log] [blame]
Adrien Béraudb00ed3f2015-06-07 15:36:06 -04001apply plugin: 'com.android.application'
2
Adrien Béraud0e0feef2018-02-13 16:32:06 +01003def buildFirebase = project.hasProperty('buildFirebase')
4
5android {
6 compileSdkVersion 27
Pierre Duchemin2b2a9ff2018-02-20 11:21:02 -05007 buildToolsVersion '27.0.3'
Adrien Béraud0e0feef2018-02-13 16:32:06 +01008 defaultConfig {
Adrien Béraud3de26d52018-03-10 16:10:02 -05009 minSdkVersion 19
Adrien Béraud0e0feef2018-02-13 16:32:06 +010010 targetSdkVersion 27
Adrien Béraudcad9db82018-04-21 21:00:41 -040011 versionCode 116
12 versionName "20180421"
Adrien Béraud0e0feef2018-02-13 16:32:06 +010013 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éraud0e0feef2018-02-13 16:32:06 +010023 // 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éraudcad9db82018-04-21 21:00:41 -040037 debug {
38 minifyEnabled true
39 debuggable true
40 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
41 }
Adrien Béraud0e0feef2018-02-13 16:32:06 +010042 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 Bertozzi2b2aa6f2016-04-28 11:18:57 -040075
Adrien Béraudb00ed3f2015-06-07 15:36:06 -040076dependencies {
Adrien Béraud5f51c722018-04-06 00:54:31 -040077 def android_support_version = "27.1.1"
Pierre Duchemin511775d2018-02-15 16:11:38 -050078 def butterknife_version = "8.8.1"
79 def dagger_version = "2.12"
80
Pierre Ducheminb5317682017-12-27 16:38:12 -050081 implementation fileTree(include: '*.jar', dir: 'libs')
82 implementation project(':libringclient')
Alexandre Lision5da46fa2017-08-09 10:25:50 -040083
Pierre Ducheminb5317682017-12-27 16:38:12 -050084 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 Duchemin8b715f82018-01-09 11:53:40 -050091 implementation "com.android.support:preference-leanback-v17:$android_support_version"
Alexandre Lision5da46fa2017-08-09 10:25:50 -040092
Romain Bertozzi64a66782016-08-02 12:10:38 -040093 // ORM
Pierre Ducheminb5317682017-12-27 16:38:12 -050094 implementation 'com.j256.ormlite:ormlite-android:4.48'
Alexandre Lision5da46fa2017-08-09 10:25:50 -040095
Romain Bertozzi64a66782016-08-02 12:10:38 -040096 // Barcode scanning
Pierre Ducheminb5317682017-12-27 16:38:12 -050097 implementation 'com.journeyapps:zxing-android-embedded:3.5.0@aar'
Alexandre Lision5da46fa2017-08-09 10:25:50 -040098
Romain Bertozzi64a66782016-08-02 12:10:38 -040099 // Butterknife
Pierre Ducheminb5317682017-12-27 16:38:12 -0500100 implementation "com.jakewharton:butterknife:$butterknife_version"
101 annotationProcessor "com.jakewharton:butterknife-compiler:$butterknife_version"
102
Pierre Ducheminbb833672018-03-09 16:18:33 -0500103 implementation 'com.rodolfonavalon:ShapeRippleLibrary:1.0.0'
Alexandre Lision5da46fa2017-08-09 10:25:50 -0400104
Thibault Wittemberg55030872016-11-08 10:55:54 -0500105 // Dagger dependency injection
Pierre Duchemin511775d2018-02-15 16:11:38 -0500106 implementation "com.google.dagger:dagger:$dagger_version"
Pierre Ducheminb5317682017-12-27 16:38:12 -0500107 annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"
Pierre Duchemin511775d2018-02-15 16:11:38 -0500108 compileOnly 'javax.annotation:jsr250-api:1.0'
Alexandre Lision5da46fa2017-08-09 10:25:50 -0400109
Hadrien De Sousa84ab2d22017-03-16 15:45:52 -0400110 // Glide
Adrien Béraud5f8c3f72018-03-09 14:49:39 -0500111 implementation 'com.github.bumptech.glide:glide:4.6.1'
112 annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
Hadrien De Sousa0dc83162017-11-10 16:15:18 -0500113
114 // RxAndroid
Pierre Duchemin2b2a9ff2018-02-20 11:21:02 -0500115 implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
Adrien Béraud0cfb6c82018-01-24 13:01:23 -0500116
Adrien Béraud64538722018-03-15 17:34:00 -0400117 implementation 'com.jsibbold:zoomage:1.1.0'
118
Adrien Béraud5f51c722018-04-06 00:54:31 -0400119 withFirebaseImplementation 'com.google.firebase:firebase-messaging:12.0.1'
Adrien Béraudb00ed3f2015-06-07 15:36:06 -0400120}
121
Adrien Béraud0e0feef2018-02-13 16:32:06 +0100122if (buildFirebase) {
123 println 'apply plugin ' + buildFirebase
Adrien Béraud0cfb6c82018-01-24 13:01:23 -0500124 apply plugin: 'com.google.gms.google-services'
125}