summaryrefslogtreecommitdiff
path: root/main/build.gradle
diff options
context:
space:
mode:
authorArne Schwabe <arne@openvpn.net>2019-02-03 17:49:20 +0100
committerArne Schwabe <arne@openvpn.net>2019-02-03 22:22:57 +0100
commitb3b28c74c0b319ac34993df29786ec1a5b2e9bde (patch)
tree5fad1dfd62a72b62abe76825934e9ed73fa7fb0b /main/build.gradle
parentbabf18e0cecc299f004105b9ce6f0ad06003c9d9 (diff)
Change gradle files to kotlin
Diffstat (limited to 'main/build.gradle')
-rw-r--r--main/build.gradle164
1 files changed, 0 insertions, 164 deletions
diff --git a/main/build.gradle b/main/build.gradle
deleted file mode 100644
index aa9d03e0..00000000
--- a/main/build.gradle
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * 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.1.3'
- implementation 'com.android.support:support-annotations:28.0.0'
- implementation 'com.android.support:cardview-v7:28.0.0'
- implementation 'com.android.support:recyclerview-v7:28.0.0'
- // compile 'ch.acra:acra:4.5.0'
- implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'
-
- testImplementation 'junit:junit:4.12'
- testImplementation 'org.mockito:mockito-core:2.16.0'
- testImplementation "org.robolectric:robolectric:3.7.1"
-
-
-}
-
-
-
-def openvpn3SwigFiles = new File(buildDir, "generated/source/ovpn3swig/ovpn3")
-
-task ("generateOpenVPN3Swig" ,type:Exec) {
- def swigcmd = "swig"
- // Workaround for Mac OS X since it otherwise does not find swig and I cannot get
- // the Exec task to respect the PATH environment :(
- if (file("/usr/local/bin/swig").exists())
- swigcmd = "/usr/local/bin/swig"
-
- doFirst {
- mkdir openvpn3SwigFiles
- }
- commandLine swigcmd, "-outdir", openvpn3SwigFiles, "-outcurrentdir", "-c++", "-java", "-package", "net.openvpn.ovpn3",
- "-Isrc/main/cpp/openvpn3/client", "-Isrc/main/cpp/openvpn3/",
- "-o", "${openvpn3SwigFiles}/ovpncli_wrap.cxx", "-oh", "${openvpn3SwigFiles}/ovpncli_wrap.h",
- "src/main/cpp/openvpn3/javacli/ovpncli.i"
-\
-}
-
-android {
- compileSdkVersion 28
-
- defaultConfig {
- minSdkVersion 14
- targetSdkVersion 28
- versionCode = 160
- versionName = "0.7.7"
-
- 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']
- }
-
- normal {
- java.srcDirs =["src/ovpn3/java/", openvpn3SwigFiles]
- }
-
- noovpn3 {
- }
-
- 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 {
- noovpn3 {
- dimension "implementation"
- buildConfigField 'boolean', 'openvpn3', 'false'
- }
- normal {
- dimension "implementation"
- buildConfigField 'boolean', 'openvpn3', 'true'
- }
-
- }
-
-
- 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)
-}
-
-
-android.applicationVariants.all { variant ->
- variant.productFlavors.each {
- if (it.dimension == 'implementation' && it.name != 'noovpn3')
- variant.getJavaCompiler().dependsOn(generateOpenVPN3Swig)
-
- }
-
-} \ No newline at end of file