Add support for Gradle build directory (resolve #802)
This commit is contained in:
@@ -191,7 +191,19 @@ class AndroidPlatform extends PlatformTarget {
|
||||
|
||||
}
|
||||
|
||||
var apkPath = FileSystem.fullPath (targetDirectory) + "/bin/app/build/outputs/apk/" + project.app.file + build + ".apk";
|
||||
var outputDirectory = null;
|
||||
|
||||
if (project.config.exists ("android.gradle-build-directory")) {
|
||||
|
||||
outputDirectory = PathHelper.combine (project.config.getString ("android.gradle-build-directory"), project.app.file + "/app/outputs/apk");
|
||||
|
||||
} else {
|
||||
|
||||
outputDirectory = PathHelper.combine (FileSystem.fullPath (targetDirectory), "bin/app/build/outputs/apk");
|
||||
|
||||
}
|
||||
|
||||
var apkPath = PathHelper.combine (outputDirectory, project.app.file + build + ".apk");
|
||||
|
||||
deviceID = AndroidHelper.install (project, apkPath, deviceID);
|
||||
|
||||
@@ -315,6 +327,12 @@ class AndroidPlatform extends PlatformTarget {
|
||||
context.ANDROID_GRADLE_PLUGIN = project.config.getString ("android.gradle-plugin", "2.1.0");
|
||||
context.ANDROID_LIBRARY_PROJECTS = [];
|
||||
|
||||
if (project.config.exists ("android.gradle-build-directory")) {
|
||||
|
||||
context.ANDROID_GRADLE_BUILD_DIRECTORY = project.config.getString ("android.gradle-build-directory");
|
||||
|
||||
}
|
||||
|
||||
if (!project.environment.exists ("ANDROID_SDK") || !project.environment.exists ("ANDROID_NDK_ROOT")) {
|
||||
|
||||
var command = "lime";
|
||||
|
||||
@@ -19,7 +19,8 @@ allprojects {
|
||||
jcenter {
|
||||
url "http://jcenter.bintray.com/"
|
||||
}
|
||||
}
|
||||
}::if ANDROID_GRADLE_BUILD_DIRECTORY::
|
||||
buildDir = "::ANDROID_GRADLE_BUILD_DIRECTORY::/::APP_FILE::/${project.name}"::end::
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
|
||||
Reference in New Issue
Block a user