build.gradle 3.6 KB
Newer Older
stopcovid@lunabee.com's avatar
Unzip  
stopcovid@lunabee.com committed
1 2 3 4 5 6 7
/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 *
 * Authors
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
8
 * Created by Lunabee Studio / Date - 2020/04/05 - for the TOUS-ANTI-COVID project
stopcovid@lunabee.com's avatar
Unzip  
stopcovid@lunabee.com committed
9 10 11 12 13 14 15 16 17 18 19 20
 */

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'androidx.navigation.safeargs.kotlin'
apply plugin: 'shot'

apply from: 'test.gradle'

android {
stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
21 22 23
    compileSdkVersion 30
    buildToolsVersion '30.0.2'

stopcovid@lunabee.com's avatar
Unzip  
stopcovid@lunabee.com committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

            packagingOptions {
                exclude 'DebugProbesKt.bin'
            }
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
41
    kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
stopcovid@lunabee.com's avatar
Unzip  
stopcovid@lunabee.com committed
42 43 44 45

    defaultConfig {
        applicationId "fr.gouv.android.stopcovid"
        minSdkVersion 21
stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
46
        targetSdkVersion 30
stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
47 48
        versionCode 104
        versionName "2.1.8"
stopcovid@lunabee.com's avatar
Unzip  
stopcovid@lunabee.com committed
49 50 51

        testInstrumentationRunner = 'com.lunabeestudio.stopcovid.TestRunner'

stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
52 53
        buildConfigField 'String', 'CAPTCHA_API_KEY', '"6LettPsUAAAAAHYaFdRBOilHUgmTMSIPKNZN4D7l"'
        buildConfigField 'String', 'CAPTCHA_URL', '"https://stopcovid.gouv.fr"'
stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
54 55
        buildConfigField 'String', 'APP_MAINTENANCE_CERTIFICATE_SHA256', '"sha256/sXQojvwsiyblrpMQIVRXGC5u7AgknzTJm+VIK1kQmD8="'
        buildConfigField 'String', 'APP_MAINTENANCE_URL', '"https://app.stopcovid.gouv.fr/maintenance/info-maintenance-v2.json"'
stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
56
        buildConfigField 'String', 'INFO_CENTER_FOLDER', '"InfoCenter/"'
stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
57
        buildConfigField 'String', 'MORE_KEY_FIGURES_FOLDER', '"MoreKeyFigures/"'
stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
58
        buildConfigField 'String', 'KEY_FIGURES_PATH', '"/infos/key-figures.json"'
stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
59
        buildConfigField 'String', 'FORM_PATH', '"/Attestations/form.json"'
stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
60
        buildConfigField 'String', 'APP_STORE_URL', '"https://play.google.com/store/apps/details?id=fr.gouv.android.stopcovid"'
stopcovid@lunabee.com's avatar
Unzip  
stopcovid@lunabee.com committed
61 62 63 64 65 66 67 68 69 70 71 72 73
    }

    lintOptions {
        disable "InvalidPackage",
                "ObsoleteLintCustomCheck",
                "UnsafeExperimentalUsageError",
                "UnsafeExperimentalUsageWarning"
    }

    testOptions {
        animationsDisabled true
    }

stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
74
    buildFeatures.viewBinding = true
stopcovid@lunabee.com's avatar
Unzip  
stopcovid@lunabee.com committed
75 76 77
}

dependencies {
stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
78 79 80 81
    implementation "androidx.documentfile:documentfile:_"
    implementation "androidx.lifecycle:lifecycle-runtime-ktx:_"
    implementation "androidx.swiperefreshlayout:swiperefreshlayout:_"
    implementation "androidx.work:work-runtime-ktx:_"
stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
82

stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
83
    implementation "com.airbnb.android:lottie:_"
stopcovid@lunabee.com's avatar
Unzip  
stopcovid@lunabee.com committed
84

stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
85 86
    implementation("com.journeyapps:zxing-android-embedded:_") { transitive = false }
    implementation "com.google.zxing:core:_" // 3.4 require minSdk 24
stopcovid@lunabee.com's avatar
Unzip  
stopcovid@lunabee.com committed
87

stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
88
    implementation "com.github.razir.progressbutton:progressbutton:_"
stopcovid@lunabee.com's avatar
Unzip  
stopcovid@lunabee.com committed
89 90 91 92

    implementation project(path: ':coreui')
    implementation project(path: ':framework')
    implementation project(path: ':robert')
stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
93
    implementation project(path: ':domain')
stopcovid@lunabee.com's avatar
Unzip  
stopcovid@lunabee.com committed
94

stopcovid@lunabee.com's avatar
stopcovid@lunabee.com committed
95 96 97 98
    androidTestImplementation "androidx.test.espresso:espresso-core:_"
    androidTestImplementation "androidx.test.espresso:espresso-contrib:_"
    androidTestImplementation "androidx.test.espresso:espresso-intents:_"
    androidTestImplementation "androidx.test:rules:_"
stopcovid@lunabee.com's avatar
Unzip  
stopcovid@lunabee.com committed
99
}