build.gradle 5 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 37
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'
        }
61
62
63
64
65
66
        unsignedRelease {
            minifyEnabled true
            debuggable false
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
Daniel Wolf's avatar
Daniel Wolf committed
67
    }
68
69
70
71
    flavorDimensions "version"
    productFlavors {
        adblocker {
            dimension "version"
72
            versionNameSuffix "-adblock"
73
            versionCode 38
74
75
76
77
78
        }
        normal {
            dimension "version"
        }
    }
Daniel Wolf's avatar
Daniel Wolf committed
79
    packagingOptions {
80
        exclude 'META-INF/library_release.kotlin_module'
Daniel Wolf's avatar
Daniel Wolf committed
81
    }
82
83
84
85
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
Daniel Wolf's avatar
Daniel Wolf committed
86
87
88
    lintOptions{
        disable 'MissingTranslation'
    }
Daniel Wolf's avatar
Daniel Wolf committed
89
90
91
}

dependencies {
Daniel Wolf's avatar
Daniel Wolf committed
92
    def room_version = "2.1.0"
93

Daniel Wolf's avatar
Daniel Wolf committed
94
    implementation fileTree(dir: 'libs', include: ['*.jar'])
95
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
Daniel Wolf's avatar
Daniel Wolf committed
96
97
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0-M2'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0-M2'
Daniel Wolf's avatar
Daniel Wolf committed
98

99
100
101
102
103
    implementation 'com.frostnerd.utilskt:preferences:1.5.12' // https://git.frostnerd.com/AndroidUtils/preferenceskt (Accessible after logging in [free of charge])
    implementation 'com.frostnerd.utilskt:navigationdraweractivity:1.3.18' // https://git.frostnerd.com/AndroidUtils/navigationdraweractivity (Accessible after logging in [free of charge])
    implementation 'com.frostnerd.utilskt:encrypteddnstunnelproxy:1.5.115' // https://git.frostnerd.com/AndroidUtils/encrypteddnstunnelproxy
    implementation 'com.frostnerd.utilskt:general:1.0.16' // https://git.frostnerd.com/AndroidUtils/generalkt (Accessible after logging in [free of charge])
    implementation 'com.frostnerd.utilskt:adapters:1.1.1' // https://git.frostnerd.com/AndroidUtils/Adapters (Accessible after logging in [free of charge])
Daniel Wolf's avatar
Daniel Wolf committed
104

Daniel Wolf's avatar
Daniel Wolf committed
105
106
    implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
    implementation "androidx.preference:preference:1.1.0-rc01"
Daniel Wolf's avatar
Daniel Wolf committed
107
    implementation "com.google.android.material:material:1.1.0-alpha07"
Daniel Wolf's avatar
Daniel Wolf committed
108

Daniel Wolf's avatar
Daniel Wolf committed
109
    implementation "androidx.room:room-runtime:$room_version"
110
    kapt "androidx.room:room-compiler:$room_version"
Daniel Wolf's avatar
Daniel Wolf committed
111
    implementation "androidx.room:room-coroutines:2.1.0-alpha04"
112
113
    testImplementation "androidx.room:room-testing:$room_version"

Daniel Wolf's avatar
Daniel Wolf committed
114
    implementation 'io.sentry:sentry-android:1.7.23'
115
    implementation 'com.github.anrwatchdog:anrwatchdog:1.4.0'
Daniel Wolf's avatar
Daniel Wolf committed
116

117
118
    implementation 'com.github.jorgecastilloprz:fabprogresscircle:1.01@aar'

119
    implementation 'com.squareup.leakcanary:leaksentry:2.0-alpha-3'
Daniel Wolf's avatar
Daniel Wolf committed
120
121
    debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-alpha-3'

Daniel Wolf's avatar
Daniel Wolf committed
122
    testImplementation 'junit:junit:4.12'
Daniel Wolf's avatar
Daniel Wolf committed
123
124
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
Daniel Wolf's avatar
Daniel Wolf committed
125
}