diff --git a/lime/tools/platforms/AndroidPlatform.hx b/lime/tools/platforms/AndroidPlatform.hx index 0eff5b77c..00fdf67d5 100644 --- a/lime/tools/platforms/AndroidPlatform.hx +++ b/lime/tools/platforms/AndroidPlatform.hx @@ -397,12 +397,6 @@ class AndroidPlatform extends PlatformTarget { FileHelper.recursiveCopy (library.source, destination + "/deps/" + library.name, context, true); - if (!FileSystem.exists (destination + "/deps/" + library.name + "/build.gradle")) { - - File.saveContent (destination + "/deps/" + library.name + "/build.gradle", "ant.importBuild 'build.xml'\n"); - - } - } FileHelper.recursiveCopyTemplate (project.templatePaths, "android/template", destination, context); diff --git a/templates/android/template/build.gradle b/templates/android/template/build.gradle index 2f5690c36..bb3db7ca0 100644 --- a/templates/android/template/build.gradle +++ b/templates/android/template/build.gradle @@ -25,3 +25,7 @@ task clean(type: Delete) { task wrapper(type: Wrapper) { gradleVersion = '::ANDROID_GRADLE_VERSION::' } + +configure(subprojects.findAll {!it.file('build.gradle').exists() && it.file('build.xml').exists()}) { + ant.importBuild 'build.xml' +}