diff options
author | Arne Schwabe <arne@rfc2549.org> | 2018-01-29 19:28:09 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2018-01-29 19:28:09 +0100 |
commit | f619425b26cc3a2964881bb94f73af7b984bda67 (patch) | |
tree | 8049f1dc946957484b713527ce1e77b511c0f1d4 /main | |
parent | 181d59f8399858cfeb01d0c75bf4c8d1a576d64a (diff) |
Change ovpn3 into normal and normal into noovpn3
Diffstat (limited to 'main')
-rw-r--r-- | main/build.gradle | 9 | ||||
-rw-r--r-- | main/src/main/cpp/CMakeLists.txt | 2 | ||||
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/VpnProfile.java | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/main/build.gradle b/main/build.gradle index b56cdcfd..6b6d4580 100644 --- a/main/build.gradle +++ b/main/build.gradle @@ -71,10 +71,13 @@ android { assets.srcDirs = ['src/main/assets', 'build/ovpnassets'] } - ovpn3 { + normal { java.srcDirs =["src/ovpn3/java/", openvpn3SwigFiles] } + noovpn3 { + } + debug { } @@ -103,7 +106,7 @@ android { flavorDimensions "implementation" productFlavors { - ovpn3 { + noovpn3 { dimension "implementation" } @@ -140,7 +143,7 @@ android.applicationVariants.all { variant -> android.applicationVariants.all { variant -> variant.productFlavors.each { - if (it.dimension == 'implementation' && it.name == 'ovpn3') + if (it.dimension == 'implementation' && it.name != 'noovpn3') variant.getJavaCompiler().dependsOn(generateOpenVPN3Swig) } diff --git a/main/src/main/cpp/CMakeLists.txt b/main/src/main/cpp/CMakeLists.txt index 318715cb..4ef0975a 100644 --- a/main/src/main/cpp/CMakeLists.txt +++ b/main/src/main/cpp/CMakeLists.txt @@ -20,7 +20,7 @@ include(openssl.cmake) # Super hacky way to determine flavour #-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/arne/software/icsopenvpn/main/build/intermediates/cmake/normal/debug/obj/arm64-v8a -if (${CMAKE_LIBRARY_OUTPUT_DIRECTORY} MATCHES "build/intermediates/cmake/.*ovpn3.*/") +if (NOT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} MATCHES "build/intermediates/cmake/.*noovpn3.*/") add_subdirectory(mbedtls) add_custom_command(OUTPUT "javacli/ovpncli_wrap.cxx" file(MAKE_DIRECTORY ovpn3/java/net/openvpn/ovpn3) diff --git a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java index 7a77dd0c..50668b88 100644 --- a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java +++ b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java @@ -274,7 +274,7 @@ public class VpnProfile implements Serializable, Cloneable { public static boolean doUseOpenVPN3(Context c) { SharedPreferences prefs = Preferences.getDefaultSharedPreferences(c); boolean useOpenVPN3 = prefs.getBoolean("ovpn3", false); - if (!"ovpn3".equals(BuildConfig.FLAVOR)) + if ("noovpn3".equals(BuildConfig.FLAVOR)) useOpenVPN3 = false; return useOpenVPN3; } |