2015-07-24 20:15:58 +00:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion 19
|
|
|
|
buildToolsVersion "22.0.1"
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "com.skia.visualbench"
|
2015-08-19 19:06:46 +00:00
|
|
|
minSdkVersion 19
|
2015-08-31 16:30:57 +00:00
|
|
|
signingConfig signingConfigs.debug
|
2015-07-24 20:15:58 +00:00
|
|
|
targetSdkVersion 19
|
|
|
|
versionCode 1
|
|
|
|
versionName "1.0"
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets.main.jni.srcDirs = [] //disable automatic ndk-build call
|
|
|
|
sourceSets.main.jniLibs.srcDir "src/main/libs"
|
|
|
|
|
|
|
|
productFlavors {
|
|
|
|
arm {}
|
|
|
|
arm64 {}
|
|
|
|
x86 {}
|
|
|
|
x86_64 {}
|
|
|
|
mips {}
|
|
|
|
mips64 {}
|
|
|
|
}
|
|
|
|
|
|
|
|
// make sure that app is built and shared libraries are copied to correct directories
|
|
|
|
applicationVariants.all{ variant ->
|
|
|
|
|
|
|
|
def buildNativeLib = task("${variant.name}_NativeLib", type:Exec) {
|
|
|
|
workingDir '../../../..' // top-level skia directory
|
|
|
|
commandLine constructBuildCommand(variant, "CopyVisualBenchDeps").split()
|
|
|
|
environment PATH: getPathWithDepotTools()
|
|
|
|
environment ANDROID_SDK_ROOT: getSDKPath()
|
|
|
|
}
|
|
|
|
|
|
|
|
buildNativeLib.onlyIf { !project.hasProperty("suppressNativeBuild") }
|
|
|
|
|
|
|
|
TaskCollection<Task> assembleTask
|
|
|
|
assembleTask = project.tasks.matching {
|
|
|
|
it.name.contains("assemble") &&
|
|
|
|
it.name.toLowerCase().endsWith(variant.name.toLowerCase())
|
|
|
|
}
|
|
|
|
assembleTask.getAt(0).dependsOn buildNativeLib
|
|
|
|
}
|
2015-08-19 19:06:46 +00:00
|
|
|
}
|