| OLD | NEW |
| (Empty) |
| 1 apply plugin: 'com.android.application' | |
| 2 | |
| 3 android { | |
| 4 compileSdkVersion 19 | |
| 5 buildToolsVersion "22.0.1" | |
| 6 | |
| 7 defaultConfig { | |
| 8 applicationId "com.skia.visualbench" | |
| 9 minSdkVersion 9 | |
| 10 targetSdkVersion 19 | |
| 11 versionCode 1 | |
| 12 versionName "1.0" | |
| 13 } | |
| 14 | |
| 15 sourceSets.main.jni.srcDirs = [] //disable automatic ndk-build call | |
| 16 sourceSets.main.jniLibs.srcDir "src/main/libs" | |
| 17 | |
| 18 productFlavors { | |
| 19 arm {} | |
| 20 arm64 {} | |
| 21 x86 {} | |
| 22 x86_64 {} | |
| 23 mips {} | |
| 24 mips64 {} | |
| 25 } | |
| 26 | |
| 27 // make sure that app is built and shared libraries are copied to correct di
rectories | |
| 28 applicationVariants.all{ variant -> | |
| 29 | |
| 30 def buildNativeLib = task("${variant.name}_NativeLib", type:Exec) { | |
| 31 workingDir '../../../..' // top-level skia directory | |
| 32 commandLine constructBuildCommand(variant, "CopyVisualBenchDeps").sp
lit() | |
| 33 environment PATH: getPathWithDepotTools() | |
| 34 environment ANDROID_SDK_ROOT: getSDKPath() | |
| 35 } | |
| 36 | |
| 37 if (!hasProperty("suppressNativeBuild")) { | |
| 38 TaskCollection<Task> assembleTask | |
| 39 assembleTask = project.tasks.matching { | |
| 40 it.name.contains("assemble") && | |
| 41 it.name.toLowerCase().endsWith(variant.name.toLowerCase(
)) | |
| 42 } | |
| 43 assembleTask.getAt(0).dependsOn buildNativeLib | |
| 44 } | |
| 45 } | |
| 46 } | |
| OLD | NEW |