/* * Copyright (c) 2012-2016 Arne Schwabe * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt */ import com.android.builder.model.ProductFlavor apply plugin: 'com.android.application' apply plugin: 'checkstyle' checkstyle { showViolations true } repositories { jcenter() maven { url "https://jitpack.io" } maven { url 'https://maven.google.com' } } dependencies { implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.android.support:support-annotations:27.0.2' implementation 'com.android.support:cardview-v7:27.0.2' implementation 'com.android.support:recyclerview-v7:27.0.2' // compile 'ch.acra:acra:4.5.0' implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2' testImplementation 'junit:junit:4.12' } android { compileSdkVersion 27 buildToolsVersion '27.0.3' defaultConfig { minSdkVersion 14 targetSdkVersion 27 versionCode = 153 versionName = "0.6.73" externalNativeBuild { cmake { arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_static' //abiFilters "arm64-v8a" } } } externalNativeBuild { cmake { path "src/main/cpp/CMakeLists.txt" } } sourceSets { main { assets.srcDirs = ['src/main/assets', 'build/ovpnassets'] jniLibs.srcDirs = ['ovpnlibs/jniLibs'] } ovpn3 { } debug { } release { } } signingConfigs { release } lintOptions { enable 'BackButton', 'EasterEgg', 'StopShip', 'IconExpectedSize', 'GradleDynamicVersion', 'NewerVersionAvailable' warning 'ImpliedQuantity', 'MissingQuantity' disable 'MissingTranslation', 'UnsafeNativeCodeLocation' } buildTypes { release { signingConfig signingConfigs.release } } flavorDimensions "implementation" productFlavors { ovpn3 { dimension "implementation" } normal { dimension "implementation" } } compileOptions { targetCompatibility 1.8 sourceCompatibility 1.8 } } // ~/.gradle/gradle.properties if (project.hasProperty('keystoreFile') && project.hasProperty('keystorePassword') && project.hasProperty('keystoreAliasPassword')) { android.signingConfigs.release.storeFile = file(keystoreFile) android.signingConfigs.release.storePassword = keystorePassword android.signingConfigs.release.keyPassword = keystoreAliasPassword android.signingConfigs.release.keyAlias = keystoreAlias } else { android.buildTypes.release.signingConfig = null } // Ensure native build is run before assets, so assets are ready to be merged into the apk android.applicationVariants.all { variant -> variant.mergeAssets.dependsOn(variant.externalNativeBuildTasks) }