diff --git a/lime/tools/platforms/AndroidPlatform.hx b/lime/tools/platforms/AndroidPlatform.hx index c6529c327..5ef01079f 100644 --- a/lime/tools/platforms/AndroidPlatform.hx +++ b/lime/tools/platforms/AndroidPlatform.hx @@ -15,6 +15,7 @@ import lime.tools.helpers.PathHelper; import lime.tools.helpers.ProcessHelper; import lime.project.Architecture; import lime.project.AssetType; +import lime.project.Haxelib; import lime.project.HXProject; import lime.project.Icon; import lime.project.PlatformTarget; @@ -387,6 +388,17 @@ class AndroidPlatform extends PlatformTarget { FileHelper.recursiveCopy (library.source, sourceSet + "/deps/" + library.name, context, true); + if (!FileSystem.exists (sourceSet + "/deps/" + library.name + "/build.gradle")) { + + context.extensionLowerCase = library.name.toLowerCase(); + + var source = PathHelper.getHaxelib (new Haxelib ("lime")) + "templates/extension/dependencies/android/build.gradle"; + FileHelper.copyFile (source, sourceSet + "/deps/" + library.name + "/build.gradle", context, true); + + Reflect.deleteField(context, "extensionLowerCase"); + + } + } FileHelper.recursiveCopyTemplate (project.templatePaths, "android/template", destination, context); diff --git a/tools/utils/CreateTemplate.hx b/tools/utils/CreateTemplate.hx index 73fe182d4..7080e7404 100644 --- a/tools/utils/CreateTemplate.hx +++ b/tools/utils/CreateTemplate.hx @@ -35,6 +35,9 @@ class CreateTemplate { context.extensionLowerCase = extension.toLowerCase (); context.extensionUpperCase = extension.toUpperCase (); context.ANDROID_TARGET_SDK_VERSION = "::ANDROID_TARGET_SDK_VERSION::"; + context.ANDROID_MINIMUM_SDK_VERSION = "::ANDROID_MINIMUM_SDK_VERSION::"; + context.META_BUILD_NUMBER = "::META_BUILD_NUMBER::"; + context.META_VERSION = "::META_VERSION::"; PathHelper.mkdir (title); FileHelper.recursiveCopyTemplate ([ PathHelper.getHaxelib (new Haxelib ("lime"), true) + "/templates" ], "extension", title, context);