Android Gradle build specific productFlavor
Unsolved
Mobile and Embedded
-
We call qmake.exe and androiddeployqt.exe from the command line when building our app for Android.
Our Gradle file contains something like:
flavorDimensions "product" productFlavors { product1 { dimension "product" .... } product2 { dimension "product" .... } }
The result is that both productFlavors (i.e. Product1Release, Product2Release) are built when running the script. Is there any way to specify to only build one of the productFlavors? (e.g. Product1Release)
Many thanks
-
@Dylan-White Looking at the source for androiddeployqt it looks like it will only ever build debug or release builds. See the following
QString commandLine = QString::fromLatin1("%1 --no-daemon %2").arg(shellQuote(gradlePath)).arg(options.releasePackage ? QLatin1String(" assembleRelease") : QLatin1String(" assembleDebug")); if (options.verbose) commandLine += QLatin1String(" --info");