Welcome to mirror list, hosted at ThFree Co, Russian Federation.

build.gradle « app - gitlab.com/quite/mumla.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 773fff6c0d229fd8a9d8251b05f086c1e7ca6106 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*
 * Copyright (C) 2014 Andrew Comminos
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

// How to enable lints at compile time:
// allprojects {
//     tasks.withType(JavaCompile) {
//         options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
//     }
// }

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
    }
}
apply plugin: 'com.android.application'

repositories {
    jcenter()
    google()
}

dependencies {
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation project(":libraries:humla")
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'org.jsoup:jsoup:1.13.1'
    implementation 'info.guardianproject.netcipher:netcipher:2.1.0'
}


// Keep my credentials private :^)
def signingFile = file 'signing.gradle'
if (signingFile.exists()) apply from: 'signing.gradle'

android {
    compileSdkVersion 29
    buildToolsVersion '29.0.3'

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 29
        multiDexEnabled true

        applicationId "se.lublin.mumla"
        versionCode 80
        versionName "3.5.0-beta2"

        setProperty("archivesBaseName", "mumla")

        testInstrumentationRunner "android.test.InstrumentationTestRunner"
        buildConfigField "boolean", "DONATE_NAG", "false"
    }

    buildTypes {
        release {
            if (signingFile.exists()) signingConfig signingConfigs.release
        }
        debug {
        }
    }

    flavorDimensions "version"
    productFlavors {
        official {
            dimension "version"
            applicationId "se.lublin.mumla"
        }
        free {
            dimension "version"
            applicationId "se.lublin.mumla.free"
            buildConfigField "boolean", "DONATE_NAG", "true"
        }
        jenkins {
            dimension "version"
            // Abuse Jenkins environment variables. Neat.
            def env = System.getenv()
            if (env.containsKey("BUILD_NUMBER") && env.containsKey("BUILD_DISPLAY_NAME")) {
                versionCode Integer.parseInt(env.get("BUILD_NUMBER"))
                versionName env.get("BUILD_DISPLAY_NAME")
            } else {
                versionCode 1
                versionName "Unknown Nightly"
            }
            applicationId "se.lublin.mumla.jenkins"
        }
    }

    lintOptions {
        quiet false

        // spongycastle-related
        disable "InvalidPackage"

        disable "MissingTranslation"

        ignoreWarnings false
        abortOnError true
        explainIssues true
    }
}