diff options
author | halcanary <halcanary@google.com> | 2015-09-23 12:40:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-23 12:40:34 -0700 |
commit | ab26a9b427ec7c525ccd0025f19f0c91b74d8f6d (patch) | |
tree | faf1acf3fc409d7a61e23460c960e351bbf7e360 /platform_tools/android/apps/canvasproof/build.gradle | |
parent | 3420d2796bad5ce553efb9909790ea72e578dc47 (diff) |
android/apps: Add CanvasProof App;
Compare Ganesh and HWUI canvas rendering of SKPs on android.
Put SKP files in .../canvasproof/src/main/assets/skps
Run on a Marshmallow device.
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/1258123004
Diffstat (limited to 'platform_tools/android/apps/canvasproof/build.gradle')
-rw-r--r-- | platform_tools/android/apps/canvasproof/build.gradle | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/platform_tools/android/apps/canvasproof/build.gradle b/platform_tools/android/apps/canvasproof/build.gradle new file mode 100644 index 0000000000..64463e8103 --- /dev/null +++ b/platform_tools/android/apps/canvasproof/build.gradle @@ -0,0 +1,37 @@ +/* + * Copyright 2015 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ +apply plugin: 'com.android.application' +android { + compileSdkVersion 19 + buildToolsVersion "22.0.1" + defaultConfig { + applicationId "org.skia.canvasproof" + minSdkVersion 9 + targetSdkVersion 19 + versionCode 1 + versionName "1.0" + signingConfig signingConfigs.debug + } + sourceSets.main.jni.srcDirs = [] //disable automatic ndk-build call + sourceSets.main.jniLibs.srcDir "src/main/libs" + productFlavors { arm {}; arm64 {}; x86 {}; x86_64 {}; mips {}; mips64 {}; } + applicationVariants.all{ variant -> + def buildNativeLib = task("${variant.name}_NativeLib", type:Exec) { + workingDir '../../../..' // top-level skia directory + commandLine constructBuildCommand(variant, "CopyCanvasProofDeps").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 + } +} |