2017-07-29 06:10:37 +02:00
|
|
|
apply plugin: 'com.android.application'
|
2020-02-14 10:57:17 +01:00
|
|
|
apply plugin: 'kotlin-android'
|
2018-07-13 02:10:35 +02:00
|
|
|
apply from: 'nonnull.gradle'
|
2017-07-29 06:10:37 +02:00
|
|
|
|
2018-06-05 16:24:53 +02:00
|
|
|
// Create a variable called keystorePropertiesFile, and initialize it to your
|
|
|
|
// keystore.properties file, in the rootProject folder.
|
|
|
|
final def keystorePropertiesFile = rootProject.file("keystore.properties")
|
|
|
|
|
2017-07-29 06:10:37 +02:00
|
|
|
android {
|
2020-02-28 07:58:02 +01:00
|
|
|
buildToolsVersion '29.0.3'
|
2017-12-26 21:06:32 +01:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
2020-02-23 14:49:25 +01:00
|
|
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = '1.8'
|
|
|
|
}
|
|
|
|
}
|
2019-09-30 08:59:06 +02:00
|
|
|
compileSdkVersion 29
|
2018-06-19 11:53:59 +02:00
|
|
|
dataBinding.enabled true
|
2017-07-29 06:10:37 +02:00
|
|
|
defaultConfig {
|
2017-11-29 03:15:40 +01:00
|
|
|
applicationId 'com.wireguard.android'
|
2017-07-29 06:10:37 +02:00
|
|
|
minSdkVersion 21
|
2019-09-30 08:59:06 +02:00
|
|
|
targetSdkVersion 29
|
2020-02-06 21:58:40 +01:00
|
|
|
versionCode 464
|
|
|
|
versionName '0.0.20200206'
|
2018-07-28 18:27:45 +02:00
|
|
|
buildConfigField 'int', 'MIN_SDK_VERSION', "$minSdkVersion.apiLevel"
|
2017-07-29 06:10:37 +02:00
|
|
|
}
|
2018-06-05 16:24:53 +02:00
|
|
|
// If the keystore file exists
|
|
|
|
if (keystorePropertiesFile.exists()) {
|
|
|
|
// Initialize a new Properties() object called keystoreProperties.
|
|
|
|
final def keystoreProperties = new Properties()
|
|
|
|
|
|
|
|
// Load your keystore.properties file into the keystoreProperties object.
|
|
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
|
|
|
|
|
|
signingConfigs {
|
|
|
|
release {
|
|
|
|
keyAlias keystoreProperties['keyAlias']
|
|
|
|
keyPassword keystoreProperties['keyPassword']
|
|
|
|
storeFile file(keystoreProperties['storeFile'])
|
|
|
|
storePassword keystoreProperties['storePassword']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
if (keystorePropertiesFile.exists()) signingConfig signingConfigs.release
|
2018-07-24 13:52:18 +02:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
arguments "-DANDROID_PACKAGE_NAME=${android.defaultConfig.applicationId}"
|
|
|
|
}
|
|
|
|
}
|
2018-12-18 17:48:00 +01:00
|
|
|
minifyEnabled true
|
|
|
|
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
2018-06-05 16:24:53 +02:00
|
|
|
}
|
2018-07-07 19:04:34 +02:00
|
|
|
debug {
|
|
|
|
applicationIdSuffix ".debug"
|
|
|
|
versionNameSuffix "-debug"
|
2018-07-24 13:52:18 +02:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
arguments "-DANDROID_PACKAGE_NAME=${android.defaultConfig.applicationId}${applicationIdSuffix}"
|
|
|
|
}
|
|
|
|
}
|
2018-07-07 19:04:34 +02:00
|
|
|
}
|
2018-06-05 16:24:53 +02:00
|
|
|
}
|
2017-12-05 03:50:36 +01:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
path 'tools/CMakeLists.txt'
|
|
|
|
}
|
|
|
|
}
|
2017-07-29 06:10:37 +02:00
|
|
|
}
|
2018-06-19 07:36:24 +02:00
|
|
|
|
2018-04-27 16:55:42 +02:00
|
|
|
ext {
|
2019-09-27 09:57:51 +02:00
|
|
|
annotationsVersion = '1.1.0'
|
|
|
|
appcompatVersion = '1.1.0'
|
2018-12-18 11:45:37 +01:00
|
|
|
cardviewVersion = '1.0.0'
|
2020-02-23 15:30:03 +01:00
|
|
|
coreKtxVersion = '1.2.0'
|
2020-03-09 05:50:14 +01:00
|
|
|
constraintLayoutVersion = '1.1.3'
|
|
|
|
coordinatorLayoutVersion = '1.1.0'
|
2020-02-25 03:59:53 +01:00
|
|
|
databindingVersion = '3.6.0'
|
2020-02-23 15:36:15 +01:00
|
|
|
fragmentVersion = '1.2.2'
|
2020-02-12 15:16:01 +01:00
|
|
|
materialComponentsVersion = '1.1.0'
|
2018-07-13 02:10:35 +02:00
|
|
|
jsr305Version = '3.0.2'
|
2020-03-03 18:17:25 +01:00
|
|
|
kotlinVersion = '1.3.70'
|
2019-09-27 09:57:51 +02:00
|
|
|
preferenceVersion = '1.1.0'
|
|
|
|
streamsupportVersion = '1.7.1'
|
2020-02-12 15:16:01 +01:00
|
|
|
threetenabpVersion = '1.2.2'
|
2019-09-27 09:57:51 +02:00
|
|
|
// ZXING switched minSdk to 24 so we cannot upgrade to 4.0.2 without following suit.
|
|
|
|
// If you choose to upgrade to minSDK 24 then you should also disable Jetifier from
|
|
|
|
// gradle.properties.
|
2018-07-24 19:32:40 +02:00
|
|
|
zxingEmbeddedVersion = '3.6.0'
|
2019-10-13 20:48:09 +02:00
|
|
|
eddsaVersion = '0.3.0'
|
2018-04-27 16:55:42 +02:00
|
|
|
}
|
2017-07-29 06:10:37 +02:00
|
|
|
|
|
|
|
dependencies {
|
2018-12-18 11:45:37 +01:00
|
|
|
implementation "androidx.annotation:annotation:$annotationsVersion"
|
|
|
|
implementation "androidx.appcompat:appcompat:$appcompatVersion"
|
|
|
|
implementation "androidx.cardview:cardview:$cardviewVersion"
|
2020-03-09 05:50:14 +01:00
|
|
|
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
|
|
|
|
implementation "androidx.coordinatorlayout:coordinatorlayout:$coordinatorLayoutVersion"
|
2020-02-23 15:30:03 +01:00
|
|
|
implementation "androidx.core:core-ktx:$coreKtxVersion"
|
2018-12-18 11:45:37 +01:00
|
|
|
implementation "androidx.databinding:databinding-runtime:$databindingVersion"
|
2020-02-23 15:36:15 +01:00
|
|
|
implementation "androidx.fragment:fragment:$fragmentVersion"
|
2018-12-18 11:45:37 +01:00
|
|
|
implementation "androidx.preference:preference:$preferenceVersion"
|
|
|
|
implementation "com.google.android.material:material:$materialComponentsVersion"
|
2018-07-13 02:10:35 +02:00
|
|
|
implementation "com.google.code.findbugs:jsr305:$jsr305Version"
|
2018-09-06 03:17:14 +02:00
|
|
|
implementation "com.jakewharton.threetenabp:threetenabp:$threetenabpVersion"
|
2018-07-24 19:32:40 +02:00
|
|
|
implementation "com.journeyapps:zxing-android-embedded:$zxingEmbeddedVersion"
|
2018-07-31 23:17:34 +02:00
|
|
|
implementation "net.sourceforge.streamsupport:android-retrofuture:$streamsupportVersion"
|
|
|
|
implementation "net.sourceforge.streamsupport:android-retrostreams:$streamsupportVersion"
|
2019-10-13 20:48:09 +02:00
|
|
|
implementation "net.i2p.crypto:eddsa:$eddsaVersion"
|
2020-02-14 10:57:17 +01:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
2017-07-29 06:10:37 +02:00
|
|
|
}
|
2018-05-29 18:37:14 +02:00
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.compilerArgs << '-Xlint:unchecked'
|
|
|
|
options.deprecation = true
|
2018-05-29 19:08:55 +02:00
|
|
|
}
|