diff options
author | ziadb <ziadb@google.com> | 2018-05-31 15:55:09 -0400 |
---|---|---|
committer | Ziad Ben Hadj-Alouane <ziadb@google.com> | 2018-06-01 14:56:24 +0000 |
commit | 222c9cfd1b3f50d21d4a1f93b0b52dd4973fe1b5 (patch) | |
tree | f58d34a59c4d345db2c805e7c4501d32915a7cdc /platform_tools/android/apps/skqp/build.gradle | |
parent | 531a48ed788c5fabfe21704286b54d7567f35469 (diff) |
Added support for visual debugging on Android Studio
Change-Id: Icaf848c31167db10d6fbb13d74c7287b03628fb6
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/130144
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Diffstat (limited to 'platform_tools/android/apps/skqp/build.gradle')
-rw-r--r-- | platform_tools/android/apps/skqp/build.gradle | 51 |
1 files changed, 47 insertions, 4 deletions
diff --git a/platform_tools/android/apps/skqp/build.gradle b/platform_tools/android/apps/skqp/build.gradle index e368a66ef6..7d747c1791 100644 --- a/platform_tools/android/apps/skqp/build.gradle +++ b/platform_tools/android/apps/skqp/build.gradle @@ -4,8 +4,12 @@ * 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' +//Make sure this is directory corresponds to skia/platform_tools/android +final String ANDROID_CMAKE_HEADER_PATH = "../../CMakeLists.txt" + dependencies { compile 'com.android.support:design:26.+' compile 'com.android.support.test:runner:0.5' @@ -21,9 +25,48 @@ android { versionCode 1 versionName "1.0" signingConfig signingConfigs.debug + + externalNativeBuild { + cmake { + //Native libraries to build + targets "libskqp_app" + + arguments "-DANDROID_STL=c++_static", + "-DTARGETS=${android.defaultConfig.externalNativeBuild.cmake.targets}" + } + } + + buildTypes { + debug { + applicationIdSuffix ".debug" + debuggable true + } + } + + productFlavors { + arm { + ndk { + abiFilters "armeabi-v7a" + } + } + + x86 { + ndk { + abiFilters "x86" + } + } + + x64 { + ndk { + abiFilters "x86_64" + } + } + } + } + + externalNativeBuild { + cmake { + path ANDROID_CMAKE_HEADER_PATH + } } - sourceSets.main.jni.srcDirs = [] - sourceSets.main.jniLibs.srcDir "src/main/libs" - productFlavors { universal{}; arm {}; arm64 {}; x86 {}; x64 {}; arm64vulkan{}; } - setupSkiaLibraryBuild(project, applicationVariants, "libskqp_app") } |