blob: bb91e13f97fbc3f4db5e1f1a8ac1143d4dfe4818 [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
9 defaultConfig {
10 minSdkVersion 18
11 targetSdkVersion 27
12 vectorDrawables.useSupportLibrary = true
13 }
14
15 sourceSets {
16 main {
17 aidl.srcDirs = ['src/main/java']
18 jniLibs.srcDir 'src/main/libs'
19 jni.srcDirs = []
20 }
21
22 // Move the tests to tests/java, tests/res, etc...
23 instrumentTest.setRoot('tests')
24
25 // Move the build types to build-types/<type>
26 // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
27 // This moves them out of them default location under src/<type>/... which would
28 // conflict with src/ being used by the main source set.
29 // Adding new build types or product flavors should be accompanied
30 // by a similar customization.
31 debug.setRoot('build-types/debug')
32 release.setRoot('build-types/release')
33 }
34 compileOptions {
35 sourceCompatibility JavaVersion.VERSION_1_8
36 targetCompatibility JavaVersion.VERSION_1_8
37 }
38 buildTypes {
Pierre Duchemin2b2a9ff2018-02-20 11:21:02 -050039 debug {
40 minifyEnabled true
41 proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
42 }
Adrien Béraud0e0feef2018-02-13 16:32:06 +010043 release {
44 minifyEnabled true
45 proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
46 }
47 }
48 flavorDimensions "push"
49 productFlavors {
50 noPush {
51 dimension "push"
52 }
53 withFirebase {
54 dimension "push"
55 }
56 }
57 signingConfigs {
58 config {
59 keyAlias 'ring'
60 storeFile file('../keystore.bin')
61 }
62 }
63 lintOptions {
64 disable 'MissingTranslation'
65 }
66 splits {
67 abi {
68 enable true
69 reset()
70 def sp = archs.split(',')
71 include(sp)
72 universalApk true
73 }
74 }
75}
Romain Bertozzi2b2aa6f2016-04-28 11:18:57 -040076
Adrien Béraudb00ed3f2015-06-07 15:36:06 -040077dependencies {
Pierre Duchemin511775d2018-02-15 16:11:38 -050078 def android_support_version = "27.0.2"
79 def butterknife_version = "8.8.1"
80 def dagger_version = "2.12"
81
Pierre Ducheminb5317682017-12-27 16:38:12 -050082 implementation fileTree(include: '*.jar', dir: 'libs')
83 implementation project(':libringclient')
Alexandre Lision5da46fa2017-08-09 10:25:50 -040084
Pierre Ducheminb5317682017-12-27 16:38:12 -050085 implementation "com.android.support:support-v13:$android_support_version"
86 implementation "com.android.support:design:$android_support_version"
87 implementation "com.android.support:cardview-v7:$android_support_version"
88 implementation "com.android.support:preference-v14:$android_support_version"
89 implementation "com.android.support:recyclerview-v7:$android_support_version"
90 implementation "com.android.support:appcompat-v7:$android_support_version"
91 implementation "com.android.support:leanback-v17:$android_support_version"
Pierre Duchemin8b715f82018-01-09 11:53:40 -050092 implementation "com.android.support:preference-leanback-v17:$android_support_version"
Alexandre Lision5da46fa2017-08-09 10:25:50 -040093
Romain Bertozzi64a66782016-08-02 12:10:38 -040094 // ORM
Pierre Ducheminb5317682017-12-27 16:38:12 -050095 implementation 'com.j256.ormlite:ormlite-android:4.48'
Alexandre Lision5da46fa2017-08-09 10:25:50 -040096
Romain Bertozzi64a66782016-08-02 12:10:38 -040097 // Barcode scanning
Pierre Ducheminb5317682017-12-27 16:38:12 -050098 implementation 'com.journeyapps:zxing-android-embedded:3.5.0@aar'
Alexandre Lision5da46fa2017-08-09 10:25:50 -040099
Romain Bertozzi64a66782016-08-02 12:10:38 -0400100 // Butterknife
Pierre Ducheminb5317682017-12-27 16:38:12 -0500101 implementation "com.jakewharton:butterknife:$butterknife_version"
102 annotationProcessor "com.jakewharton:butterknife-compiler:$butterknife_version"
103
104 implementation 'com.skyfishjy.ripplebackground:library:1.0.1'
Alexandre Lision5da46fa2017-08-09 10:25:50 -0400105
Thibault Wittemberg55030872016-11-08 10:55:54 -0500106 // Dagger dependency injection
Pierre Duchemin511775d2018-02-15 16:11:38 -0500107 implementation "com.google.dagger:dagger:$dagger_version"
Pierre Ducheminb5317682017-12-27 16:38:12 -0500108 annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"
Pierre Duchemin511775d2018-02-15 16:11:38 -0500109 compileOnly 'javax.annotation:jsr250-api:1.0'
Alexandre Lision5da46fa2017-08-09 10:25:50 -0400110
Hadrien De Sousa84ab2d22017-03-16 15:45:52 -0400111 // Glide
Pierre Ducheminb5317682017-12-27 16:38:12 -0500112 implementation 'com.github.bumptech.glide:glide:3.8.0'
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éraud0e0feef2018-02-13 16:32:06 +0100117 withFirebaseImplementation 'com.google.firebase:firebase-messaging:11.8.0'
Adrien Béraudb00ed3f2015-06-07 15:36:06 -0400118}
119
Adrien Béraud0e0feef2018-02-13 16:32:06 +0100120if (buildFirebase) {
121 println 'apply plugin ' + buildFirebase
Adrien Béraud0cfb6c82018-01-24 13:01:23 -0500122 apply plugin: 'com.google.gms.google-services'
123}