Skip to content

Instantly share code, notes, and snippets.

@tuanchauict
Created April 11, 2017 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuanchauict/4f7506951ac4e7ea1a8e34833c7db1e5 to your computer and use it in GitHub Desktop.
Save tuanchauict/4f7506951ac4e7ea1a8e34833c7db1e5 to your computer and use it in GitHub Desktop.
android {
defaultConfig{
multiDexEnabled true
}
android.applicationVariants.all { variant ->
println "*********" + variant.description + "********** ";
def variants = variant.baseName.split("-");
def apkName = "mangarock-";
apkName += variants[0];
apkName += "-v" + variant.mergedFlavor.versionName;
if (variant.buildType.name == "release") {
apkName += "-RELEASE.apk";
} else if (variant.buildType.name == "prerelease") {
apkName += "-PRERELEASE.apk";
} else {
apkName += "-SNAPSHOT.apk";
}
println "*********" + "$project.buildDir/outputs/apk/" + apkName + "**********";
variant.outputs.each { output ->
def file = output.outputFile
output.outputFile = new File("$project.buildDir/outputs/apk/" + apkName)
}
// variant.outputFile = file("$project.buildDir/outputs/apk/" + apkName)
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
abortOnError false
disable 'InvalidPackage'
checkReleaseBuilds false
}
packagingOptions {
exclude 'META-INF/rxjava.properties'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'lib/arm64-v8a/libcardioDecider.so'
exclude 'lib/arm64-v8a/libcardioRecognizer.so'
exclude 'lib/arm64-v8a/libcardioRecognizer_tegra2.so'
exclude 'lib/arm64-v8a/libopencv_core.so'
exclude 'lib/arm64-v8a/libopencv_imgproc.so'
exclude 'lib/armeabi/libcardioDecider.so'
exclude 'lib/armeabi-v7a/libcardioDecider.so'
exclude 'lib/armeabi-v7a/libcardioRecognizer.so'
exclude 'lib/armeabi-v7a/libcardioRecognizer_tegra2.so'
exclude 'lib/armeabi-v7a/libopencv_core.so'
exclude 'lib/armeabi-v7a/libopencv_imgproc.so'
exclude 'lib/mips/libcardioDecider.so'
exclude 'lib/x86/libcardioDecider.so'
exclude 'lib/x86/libcardioRecognizer.so'
exclude 'lib/x86/libcardioRecognizer_tegra2.so'
exclude 'lib/x86/libopencv_core.so'
exclude 'lib/x86/libopencv_imgproc.so'
exclude 'lib/x86_64/libcardioDecider.so'
exclude 'lib/x86_64/libcardioRecognizer.so'
exclude 'lib/x86_64/libcardioRecognizer_tegra2.so'
exclude 'lib/x86_64/libopencv_core.so'
exclude 'lib/x86_64/libopencv_imgproc.so'
exclude "lib/arm64-v8a/libgnustl_shared.so"
exclude "lib/arm64-v8a/libfb.so"
exclude "lib/arm64-v8a/libfolly_json.so"
exclude "lib/arm64-v8a/libglog_init.so"
exclude "lib/arm64-v8a/libgnustl_shared.so"
exclude "lib/arm64-v8a/libreactnativejni.so"
exclude "lib/arm64-v8a/libreactnativejnifb.so"
exclude "lib/arm64-v8a/libyoga.so"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment