summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2018-01-11 18:07:57 +0100
committerArne Schwabe <arne@rfc2549.org>2018-01-11 18:07:57 +0100
commitfa7eae752dd1ac2ef437f4cb19ed9a79ae93418e (patch)
tree61b953404a40c6e3c624fe0b1994515d349d5d32
parent87044429de0689f434639ac04813666584d79a54 (diff)
Only build openvpn3 swig files when building openvpn3
-rw-r--r--main/build.gradle13
1 files changed, 10 insertions, 3 deletions
diff --git a/main/build.gradle b/main/build.gradle
index f10f3795..0d23fcdc 100644
--- a/main/build.gradle
+++ b/main/build.gradle
@@ -137,6 +137,13 @@ android.applicationVariants.all { variant ->
variant.mergeAssets.dependsOn(variant.externalNativeBuildTasks)
}
-android.applicationVariants.all { variant ->
- variant.getJavaCompiler().dependsOn(generateOpenVPN3Swig)
-}
+
+android.variantFilter { variant ->
+ def dim = variant.flavors.collectEntries {
+ [(it.productFlavor.dimension): it.productFlavor.name]
+ }
+
+ if (dim.dimensionOne == 'implementation' && dim.dimensionSecond == 'ovpn3') {
+ variant.getJavaCompiler().dependsOn(generateOpenVPN3Swig)
+ }
+} \ No newline at end of file