From 5af40345412020dd7727848dc2424c1977dd2eba Mon Sep 17 00:00:00 2001 From: player-03 Date: Sun, 5 Jun 2016 04:17:50 -0400 Subject: [PATCH] If build.xml exists, ignore it and use a bunch of Gradle code instead. --- templates/android/template/build.gradle | 29 ++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/templates/android/template/build.gradle b/templates/android/template/build.gradle index bb3db7ca0..1e3fcc9dd 100644 --- a/templates/android/template/build.gradle +++ b/templates/android/template/build.gradle @@ -27,5 +27,32 @@ task wrapper(type: Wrapper) { } configure(subprojects.findAll {!it.file('build.gradle').exists() && it.file('build.xml').exists()}) { - ant.importBuild 'build.xml' + buildscript { + repositories { + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:2.1.0' + } + } + + apply plugin: 'android-library' + + android { + compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION) + buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + res.srcDirs = ['res'] + } + } + } + + dependencies { + compile project(':deps:extension-api') + } }