build.gradle 4.18 KB
Newer Older
Daniel Wolf's avatar
Daniel Wolf committed
1
2
3
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
4
apply plugin: 'kotlin-kapt'
Daniel Wolf's avatar
Daniel Wolf committed
5

6
7
def debugKeyPath = new File(System.properties['user.home'], ".android/debug.keystore")

Daniel Wolf's avatar
Daniel Wolf committed
8
android {
9
10
11
12
13
14
15
16
17
18
19
20
21
22
    signingConfigs {
        fromVariablesOrDebug {
            storeFile new File(getSystemVariableOrDefault("KEYSTORE_FILE", debugKeyPath.path))
            storePassword getSystemVariableOrDefault("KEYSTORE_PASSWORD", "android")
            keyAlias = getSystemVariableOrDefault("KEYSTORE_KEY_NAME", "androiddebugkey")
            keyPassword getSystemVariableOrDefault("KEYSTORE_KEY_PASSWORD", "android")
        }
        release {
            storeFile new File(getSystemVariableOrDefault("KEYSTORE_FILE", ""))
            storePassword getSystemVariableOrDefault("KEYSTORE_PASSWORD", "")
            keyAlias = getSystemVariableOrDefault("KEYSTORE_KEY_NAME", "")
            keyPassword getSystemVariableOrDefault("KEYSTORE_KEY_PASSWORD", "")
        }
    }
Daniel Wolf's avatar
Daniel Wolf committed
23
24
25
26
27
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.frostnerd.smokescreen"
        minSdkVersion 21
        targetSdkVersion 28
28
        versionCode 32
29
        versionName "1.0-Beta"
Daniel Wolf's avatar
Daniel Wolf committed
30
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
31
32
33
34
35
36
37
38
39
40
41

        kapt {
            arguments {
                arg("room.schemaLocation", "$projectDir/schemas".toString())
            }
        }
        javaCompileOptions {
            annotationProcessorOptions {
                arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
            }
        }
42
43
44
        vectorDrawables {
            useSupportLibrary = true
        }
45
46
47
    }
    sourceSets {
        androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
Daniel Wolf's avatar
Daniel Wolf committed
48
49
50
51
    }
    buildTypes {
        release {
            minifyEnabled true
Daniel Wolf's avatar
Daniel Wolf committed
52
53
            debuggable false
            shrinkResources true
54
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
55
            signingConfig signingConfigs.release
Daniel Wolf's avatar
Daniel Wolf committed
56
        }
57
58
59
60
        fdroid {
            initWith release
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
Daniel Wolf's avatar
Daniel Wolf committed
61
    }
62
63
64
65
    flavorDimensions "version"
    productFlavors {
        adblocker {
            dimension "version"
66
            versionNameSuffix "-adblock"
67
            versionCode 33
68
69
70
71
72
        }
        normal {
            dimension "version"
        }
    }
Daniel Wolf's avatar
Daniel Wolf committed
73
    packagingOptions {
74
        exclude 'META-INF/library_release.kotlin_module'
Daniel Wolf's avatar
Daniel Wolf committed
75
    }
76
77
78
79
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
Daniel Wolf's avatar
Daniel Wolf committed
80
81
82
    lintOptions{
        disable 'MissingTranslation'
    }
Daniel Wolf's avatar
Daniel Wolf committed
83
84
85
}

dependencies {
Daniel Wolf's avatar
Daniel Wolf committed
86
    def room_version = "2.1.0"
87

Daniel Wolf's avatar
Daniel Wolf committed
88
    implementation fileTree(dir: 'libs', include: ['*.jar'])
89
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
Daniel Wolf's avatar
Daniel Wolf committed
90
91
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.1'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.1'
Daniel Wolf's avatar
Daniel Wolf committed
92

Daniel Wolf's avatar
Daniel Wolf committed
93
94
    implementation 'com.frostnerd.utilskt:preferences:1.5.9'
    implementation 'com.frostnerd.utilskt:navigationdraweractivity:1.3.17'
95
    implementation 'com.frostnerd.utilskt:encrypteddnstunnelproxy:1.5.106'
Daniel Wolf's avatar
Daniel Wolf committed
96
    implementation 'com.frostnerd.utilskt:general:1.0.15'
97
    implementation 'com.frostnerd.utils:materialedittext:1.0.20'
Daniel Wolf's avatar
Daniel Wolf committed
98
    implementation 'com.frostnerd.utils:design:1.0.17'
Daniel Wolf's avatar
Daniel Wolf committed
99
100
    implementation 'com.frostnerd.utilskt:networking:1.0.3'
    implementation 'com.frostnerd.utilskt:adapters:1.0.6'
Daniel Wolf's avatar
Daniel Wolf committed
101

Daniel Wolf's avatar
Daniel Wolf committed
102
103
    implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
    implementation "androidx.preference:preference:1.1.0-beta01"
Daniel Wolf's avatar
Daniel Wolf committed
104

Daniel Wolf's avatar
Daniel Wolf committed
105
    implementation "androidx.room:room-runtime:$room_version"
106
    kapt "androidx.room:room-compiler:$room_version"
Daniel Wolf's avatar
Daniel Wolf committed
107
    implementation "androidx.room:room-coroutines:2.1.0-alpha04"
108
109
    testImplementation "androidx.room:room-testing:$room_version"

Daniel Wolf's avatar
Daniel Wolf committed
110
    implementation 'io.sentry:sentry-android:1.7.23'
111
    implementation 'com.github.anrwatchdog:anrwatchdog:1.4.0'
Daniel Wolf's avatar
Daniel Wolf committed
112

Daniel Wolf's avatar
Daniel Wolf committed
113
    testImplementation 'junit:junit:4.12'
Daniel Wolf's avatar
Daniel Wolf committed
114
115
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
Daniel Wolf's avatar
Daniel Wolf committed
116
}