summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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