From 9bbb6205be4559593b8e43f0934ad1783ab1b9b0 Mon Sep 17 00:00:00 2001 From: Joseph Cloutier Date: Mon, 13 Feb 2017 13:01:27 -0500 Subject: [PATCH] Allow setting a different Gradle plugin version. Turns out, the Gradle version (2.10) is NOT the same as the plugin version (2.1.0). These have to be treated separately. --- dependencies/extension-api/build.gradle | 2 +- lime/tools/platforms/AndroidPlatform.hx | 1 + templates/android/template/build.gradle | 4 ++-- templates/extension/dependencies/android/build.gradle | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dependencies/extension-api/build.gradle b/dependencies/extension-api/build.gradle index 6c6f8e05d..1e486b34c 100644 --- a/dependencies/extension-api/build.gradle +++ b/dependencies/extension-api/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:2.1.0' + classpath 'com.android.tools.build:gradle:::ANDROID_GRADLE_PLUGIN::' } } diff --git a/lime/tools/platforms/AndroidPlatform.hx b/lime/tools/platforms/AndroidPlatform.hx index 8369de636..5c6273d09 100644 --- a/lime/tools/platforms/AndroidPlatform.hx +++ b/lime/tools/platforms/AndroidPlatform.hx @@ -313,6 +313,7 @@ class AndroidPlatform extends PlatformTarget { context.ANDROID_EXTENSIONS = project.config.getArrayString ("android.extension"); context.ANDROID_PERMISSIONS = project.config.getArrayString ("android.permission", [ "android.permission.WAKE_LOCK", "android.permission.INTERNET", "android.permission.VIBRATE", "android.permission.ACCESS_NETWORK_STATE" ]); context.ANDROID_GRADLE_VERSION = project.config.getString ("android.gradle-version", "2.10"); + context.ANDROID_GRADLE_PLUGIN = project.config.getString ("android.gradle-plugin", "2.1.0"); context.ANDROID_LIBRARY_PROJECTS = []; var escaped = ~/([ #!=\\:])/g; diff --git a/templates/android/template/build.gradle b/templates/android/template/build.gradle index 702485a51..f8e7d7246 100644 --- a/templates/android/template/build.gradle +++ b/templates/android/template/build.gradle @@ -7,7 +7,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:2.1.0' + classpath 'com.android.tools.build:gradle:::ANDROID_GRADLE_PLUGIN::' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -39,7 +39,7 @@ configure(subprojects.findAll {!it.file('build.gradle').exists() && it.file('bui } dependencies { - classpath 'com.android.tools.build:gradle:2.1.0' + classpath 'com.android.tools.build:gradle:::ANDROID_GRADLE_PLUGIN::' } } diff --git a/templates/extension/dependencies/android/build.gradle b/templates/extension/dependencies/android/build.gradle index e91e4ae42..4b2fe2ab7 100644 --- a/templates/extension/dependencies/android/build.gradle +++ b/templates/extension/dependencies/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:2.1.0' + classpath 'com.android.tools.build:gradle:::ANDROID_GRADLE_PLUGIN::' } }