build.gradle 4.3 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 295
        versionName "20210428-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 27
        debug {
            minifyEnabled true
            debuggable true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
28 29 30 31 32 33 34 35

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

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

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

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

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

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

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

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

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

    // Glide
Adrien Béraud's avatar
Adrien Béraud committed
119 120
    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
121 122

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

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

Adrien Béraud's avatar
Adrien Béraud committed
128
    withFirebaseImplementation('com.google.firebase:firebase-messaging:21.1.0') {
129 130 131 132
        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
133 134 135 136
}

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