/* * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon * Copyright (C) 2017-2021 Pacien TRAN-GIRARD * * 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 . */ plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' id 'com.github.triplet.play' version '2.1.0' } def keystorePropertiesFile = rootProject.file("keystore.properties") def keystoreAvailable = keystorePropertiesFile.exists() def keystoreProperties = new Properties() if (keystoreAvailable) keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) android { compileSdkVersion 30 defaultConfig { applicationId 'org.pacien.tincapp' minSdkVersion 21 targetSdkVersion 30 multiDexEnabled true versionCode 32 versionName '0.32' ndk { abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' } } if (keystoreAvailable) signingConfigs { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile file(keystoreProperties['storeFile']) storePassword keystoreProperties['storePassword'] } } buildTypes { release { if (keystoreAvailable) signingConfig signingConfigs.release minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } externalNativeBuild { cmake { path 'CMakeLists.txt' } } buildFeatures { dataBinding = true } packagingOptions { // clashing in dependencies (Apache Mina FtpServer) exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/spring.schemas' exclude 'META-INF/spring.handlers' exclude 'META-INF/license.txt' } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'net.sourceforge.streamsupport:streamsupport-cfuture:1.7.0' implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0' implementation 'androidx.core:core:1.1.0' implementation 'com.google.android.material:material:1.0.0' implementation 'com.journeyapps:zxing-android-embedded:3.6.0' implementation 'org.bouncycastle:bcpkix-jdk15on:1.61' implementation 'org.slf4j:slf4j-api:1.7.26' implementation 'com.github.tony19:logback-android:2.0.0' // commons-configuration2:2.4 requires support for interface default methods, not available on SDK <24 implementation('org.apache.commons:commons-configuration2:2.3') { exclude group: 'commons-logging', module: 'commons-logging' } implementation('commons-beanutils:commons-beanutils:1.9.3') { exclude group: 'commons-logging', module: 'commons-logging' } implementation('commons-io:commons-io:2.6') { exclude group: 'commons-logging', module: 'commons-logging' } implementation('org.apache.ftpserver:ftpserver:1.1.1') { exclude group: 'org.slf4j', module: 'slf4j-log4j12' } } repositories { mavenCentral() google() } play { if (keystoreAvailable) serviceAccountCredentials = file(keystoreProperties['apiKeyFile']) track = 'beta' resolutionStrategy = "auto" }