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

94
95
configurations.all {
    resolutionStrategy {
Daniel Wolf's avatar
Daniel Wolf committed
96
97
        force 'com.frostnerd.utilskt:dnstunnelproxy:1.5.55-test4'
        //force 'com.frostnerd.utilskt:vpntunnelproxy:2.3.29-test4'
98
99
100
    }
}

Daniel Wolf's avatar
Daniel Wolf committed
101
dependencies {
102
    def room_version = "2.1.0"
103

Daniel Wolf's avatar
Daniel Wolf committed
104
    implementation fileTree(dir: 'libs', include: ['*.jar'])
105
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
Daniel Wolf's avatar
Daniel Wolf committed
106
107
    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
108

109
    implementation 'com.frostnerd.utilskt:preferences:1.5.14' // https://git.frostnerd.com/AndroidUtils/preferenceskt (Accessible after logging in [free of charge])
110
    implementation 'com.frostnerd.utilskt:navigationdraweractivity:1.3.19' // https://git.frostnerd.com/AndroidUtils/navigationdraweractivity (Accessible after logging in [free of charge])
111
    implementation 'com.frostnerd.utilskt:encrypteddnstunnelproxy:1.5.123' // https://git.frostnerd.com/AndroidUtils/encrypteddnstunnelproxy
112
113
    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
114

Daniel Wolf's avatar
Daniel Wolf committed
115
116
    implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
    implementation "androidx.preference:preference:1.1.0-rc01"
Daniel Wolf's avatar
Daniel Wolf committed
117
    implementation "com.google.android.material:material:1.1.0-alpha07"
Daniel Wolf's avatar
Daniel Wolf committed
118

Daniel Wolf's avatar
Daniel Wolf committed
119
    implementation "androidx.room:room-runtime:$room_version"
120
    kapt "androidx.room:room-compiler:$room_version"
Daniel Wolf's avatar
Daniel Wolf committed
121
    implementation "androidx.room:room-coroutines:2.1.0-alpha04"
122
123
    testImplementation "androidx.room:room-testing:$room_version"

Daniel Wolf's avatar
Daniel Wolf committed
124
    implementation 'io.sentry:sentry-android:1.7.23'
125
    implementation 'com.github.anrwatchdog:anrwatchdog:1.4.0'
Daniel Wolf's avatar
Daniel Wolf committed
126

127
    implementation 'com.github.jorgecastilloprz:fabprogresscircle:1.01@aar'
128
    implementation 'com.squareup.leakcanary:leaksentry:2.0-alpha-3'
129
130

    leakCanaryImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-alpha-3'
Daniel Wolf's avatar
Daniel Wolf committed
131

Daniel Wolf's avatar
Daniel Wolf committed
132
    testImplementation 'junit:junit:4.12'
Daniel Wolf's avatar
Daniel Wolf committed
133
134
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
Daniel Wolf's avatar
Daniel Wolf committed
135
}