build.gradle 4.27 KB
Newer Older
Adrien Béraud's avatar
Adrien Béraud committed
1
2
apply plugin: 'com.android.application'

3
def buildFirebase = project.hasProperty('buildFirebase') || getGradle().getStartParameter().getTaskRequests().toString().contains('Firebase')
Adrien Béraud's avatar
Adrien Béraud committed
4
5

android {
6
    compileSdkVersion 30
Adrien Béraud's avatar
Adrien Béraud committed
7
    buildToolsVersion '30.0.3'
Adrien Béraud's avatar
Adrien Béraud committed
8
    ndkVersion '23.0.7272597 rc3'
Adrien Béraud's avatar
Adrien Béraud committed
9
    defaultConfig {
10
        minSdkVersion 21
11
        targetSdkVersion 30
Adrien Béraud's avatar
Adrien Béraud committed
12
13
        versionCode 301
        versionName "20210521-01"
Adrien Béraud's avatar
Adrien Béraud committed
14
    }
Adrien Béraud's avatar
Adrien Béraud committed
15
16
17
18
19
20
21
    sourceSets {
        main {
            aidl.srcDirs = ['src/main/java']
            jniLibs.srcDir 'src/main/libs'
            jni.srcDirs = []
        }
    }
22

23
    buildTypes {
Adrien Béraud's avatar
Adrien Béraud committed
24
25
26
        debug {
            debuggable true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
27
28
29
30
31
32
33
34

            packagingOptions{
                doNotStrip "*/armeabi/*.so"
                doNotStrip "*/armeabi-v7a/*.so"
                doNotStrip "*/arm64-v8a/*.so"
                doNotStrip "*/x86/*.so"
                doNotStrip "*/x86_64/*.so"
            }
Adrien Béraud's avatar
Adrien Béraud committed
35
        }
36
37
        release {
            minifyEnabled true
Adrien Béraud's avatar
Adrien Béraud committed
38
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
39
40
        }
    }
41
42
43
44
    buildFeatures {
        viewBinding true
        dataBinding true
    }
Adrien Béraud's avatar
Adrien Béraud committed
45
46
47
48
49
50
51
52
53
    flavorDimensions "push"
    productFlavors {
        noPush {
            dimension "push"
        }
        withFirebase {
            dimension "push"
        }
    }
54
55
56
57
58
59
60
61
62
    signingConfigs {
        config {
            keyAlias 'ring'
            storeFile file('../keystore.bin')
        }
    }
    lintOptions {
        disable 'MissingTranslation'
    }
63
64
65
66
67
68
69
    splits {
        abi {
            enable true
            reset()
            def sp = archs.split(',')
            include(sp)
            universalApk true
70
        }
71
    }
Adrien Béraud's avatar
Adrien Béraud committed
72
    compileOptions {
Adrien Béraud's avatar
Adrien Béraud committed
73
74
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
Adrien Béraud's avatar
Adrien Béraud committed
75
    }
76
}
77

Adrien Béraud's avatar
Adrien Béraud committed
78
dependencies {
Adrien Béraud's avatar
Adrien Béraud committed
79
    def dagger_version = '2.35.1'
80

Adrien Béraud's avatar
Adrien Béraud committed
81
82
83
    implementation fileTree(include: '*.jar', dir: 'libs')
    implementation project(':libringclient')

84
    implementation 'androidx.core:core:1.3.2'
Adrien Béraud's avatar
Adrien Béraud committed
85
    implementation "androidx.appcompat:appcompat:1.2.0"
Adrien Béraud's avatar
Adrien Béraud committed
86
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
Adrien Béraud's avatar
Adrien Béraud committed
87
88
    implementation "androidx.legacy:legacy-support-core-utils:1.0.0"
    implementation "androidx.cardview:cardview:1.0.0"
Adrien Béraud's avatar
Adrien Béraud committed
89
    implementation "androidx.preference:preference:1.1.1"
Adrien Béraud's avatar
Adrien Béraud committed
90
91
92
    implementation "androidx.recyclerview:recyclerview:1.2.0"
    implementation "androidx.leanback:leanback:1.1.0-rc01"
    implementation "androidx.leanback:leanback-preference:1.1.0-rc01"
93
    implementation 'androidx.tvprovider:tvprovider:1.0.0'
Adrien Béraud's avatar
Adrien Béraud committed
94
    implementation "androidx.media:media:1.3.1"
95
    implementation "androidx.percentlayout:percentlayout:1.0.0"
96
    implementation "com.google.android.material:material:1.3.0"
Adrien Béraud's avatar
Adrien Béraud committed
97
    implementation 'com.google.android:flexbox:2.0.1'
Adrien Béraud's avatar
Adrien Béraud committed
98
    implementation 'org.osmdroid:osmdroid-android:6.1.10'
99
    implementation "androidx.sharetarget:sharetarget:1.1.0"
Adrien Béraud's avatar
Adrien Béraud committed
100
101

    // ORM
Adrien Béraud's avatar
Adrien Béraud committed
102
    implementation 'com.j256.ormlite:ormlite-android:5.3'
Adrien Béraud's avatar
Adrien Béraud committed
103
104

    // Barcode scanning
Adrien Béraud's avatar
Adrien Béraud committed
105
    implementation('com.journeyapps:zxing-android-embedded:4.2.0') { transitive = false }
Adrien Béraud's avatar
Adrien Béraud committed
106
    implementation 'com.google.zxing:core:3.3.3'
Adrien Béraud's avatar
Adrien Béraud committed
107

108
    // RxBindings
109
    //implementation 'com.jakewharton.rxbinding3:rxbinding:3.1.0'
110

Pierre Duchemin's avatar
Pierre Duchemin committed
111
    implementation 'com.rodolfonavalon:ShapeRippleLibrary:1.0.0'
Adrien Béraud's avatar
Adrien Béraud committed
112
113

    // Dagger dependency injection
114
    implementation "com.google.dagger:dagger:$dagger_version"
Adrien Béraud's avatar
Adrien Béraud committed
115
116
117
    annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"

    // Glide
Adrien Béraud's avatar
Adrien Béraud committed
118
119
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
Adrien Béraud's avatar
Adrien Béraud committed
120
121

    // RxAndroid
Adrien Béraud's avatar
Adrien Béraud committed
122
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
Adrien Béraud's avatar
Adrien Béraud committed
123

124
    implementation 'com.jsibbold:zoomage:1.2.0'
Adrien Béraud's avatar
Adrien Béraud committed
125
    implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.2'
126

Adrien Béraud's avatar
Adrien Béraud committed
127
    withFirebaseImplementation('com.google.firebase:firebase-messaging:21.1.0') {
128
129
130
131
        exclude group: 'com.google.firebase', module: 'firebase-core'
        exclude group: 'com.google.firebase', module: 'firebase-analytics'
        exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
    }
Adrien Béraud's avatar
Adrien Béraud committed
132
133
134
135
}

if (buildFirebase) {
    println 'apply plugin ' + buildFirebase
136
    apply plugin: 'com.google.gms.google-services'
137
}