Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(938)

Unified Diff: platform_tools/android/apps/build.gradle

Issue 1926743002: Upgrade Android Gradle plugins (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | platform_tools/android/apps/canvasproof/build.gradle » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/apps/build.gradle
diff --git a/platform_tools/android/apps/build.gradle b/platform_tools/android/apps/build.gradle
index b20334b887694d3bb8652ae46ae61debc35dc1f9..7622cbdca3560c86573144dd83e5640aa778936c 100644
--- a/platform_tools/android/apps/build.gradle
+++ b/platform_tools/android/apps/build.gradle
@@ -1,11 +1,12 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
buildscript {
repositories {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.3'
+ classpath 'com.android.tools.build:gradle:2.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -18,6 +19,24 @@ allprojects {
}
}
+def setupSkiaLibraryBuild(project, appVariants, buildCmd) {
+ appVariants.all{ variant ->
+ def buildNativeLib = project.task("${variant.name}_SkiaNativeLib", type:Exec) {
+ workingDir '../../../..' // top-level skia directory
+ commandLine constructBuildCommand(variant, buildCmd).split()
+ environment PATH: getPathWithDepotTools()
+ environment ANDROID_SDK_ROOT: getSDKPath()
+ }
+ buildNativeLib.onlyIf { !project.hasProperty("suppressNativeBuild") }
+ TaskCollection<Task> compileTask = project.tasks.matching {
+ // println(it.name)
+ it.name.toLowerCase().contains("compile" + variant.name.toLowerCase()) &&
+ it.name.toLowerCase().endsWith("ndk")
+ }
+ compileTask.getAt(0).dependsOn buildNativeLib
+ }
+}
+
def getLocalProperties() {
Properties properties = new Properties()
File propFile = project.rootProject.file('local.properties')
« no previous file with comments | « no previous file | platform_tools/android/apps/canvasproof/build.gradle » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698