diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-04-14 08:26:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-14 08:26:59 +0200 |
commit | a0669609e2c282bfb5e2a72fd7bfcc242819fd44 (patch) | |
tree | 43a35132b48972d1c4c90a80214f118abb2888d4 | |
parent | 0e82b26a60b338d199e54ecad955eaf612322787 (diff) | |
parent | e598acff3a591fdd22b10930efff2c302e251130 (diff) |
Merge pull request #46880 from thebestnom/add_android_samples
Add `generateDevTemplate` to android build to build template with symbols
-rw-r--r-- | platform/android/java/app/config.gradle | 2 | ||||
-rw-r--r-- | platform/android/java/build.gradle | 36 | ||||
-rw-r--r-- | platform/android/java/gradle.properties | 2 |
3 files changed, 32 insertions, 8 deletions
diff --git a/platform/android/java/app/config.gradle b/platform/android/java/app/config.gradle index c0ae4007d2..ad9a19e2af 100644 --- a/platform/android/java/app/config.gradle +++ b/platform/android/java/app/config.gradle @@ -239,5 +239,5 @@ ext.shouldSign = { -> } ext.shouldNotStrip = { -> - return isAndroidStudio() + return isAndroidStudio() || project.hasProperty("doNotStrip") } diff --git a/platform/android/java/build.gradle b/platform/android/java/build.gradle index ec02b0fc7a..81570d9d86 100644 --- a/platform/android/java/build.gradle +++ b/platform/android/java/build.gradle @@ -122,16 +122,17 @@ task zipCustomBuild(type: Zip) { destinationDir(file(binDir)) } -/** - * Master task used to coordinate the tasks defined above to generate the set of Godot templates. - */ -task generateGodotTemplates(type: GradleBuild) { +def templateExcludedBuildTask() { // We exclude these gradle tasks so we can run the scons command manually. + def excludedTasks = [] for (String buildType : supportedTargets) { - startParameter.excludedTaskNames += ":lib:" + getSconsTaskName(buildType) + excludedTasks += ":lib:" + getSconsTaskName(buildType) } + return excludedTasks +} - tasks = [] +def templateBuildTasks() { + def tasks = [] // Only build the apks and aar files for which we have native shared libraries. for (String target : supportedTargets) { @@ -152,6 +153,29 @@ task generateGodotTemplates(type: GradleBuild) { } } + return tasks +} + +/** + * Master task used to coordinate the tasks defined above to generate the set of Godot templates. + */ +task generateGodotTemplates(type: GradleBuild) { + startParameter.excludedTaskNames = templateExcludedBuildTask() + tasks = templateBuildTasks() + + finalizedBy 'zipCustomBuild' +} + +/** + * Generates the same output as generateGodotTemplates but with dev symbols + */ +task generateDevTemplate (type: GradleBuild) { + // add parameter to set symbols to true + startParameter.projectProperties += [doNotStrip: true] + + startParameter.excludedTaskNames = templateExcludedBuildTask() + tasks = templateBuildTasks() + finalizedBy 'zipCustomBuild' } diff --git a/platform/android/java/gradle.properties b/platform/android/java/gradle.properties index 2dc069ad2f..6b3b62a9da 100644 --- a/platform/android/java/gradle.properties +++ b/platform/android/java/gradle.properties @@ -12,7 +12,7 @@ android.useAndroidX=true # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m +org.gradle.jvmargs=-Xmx4536m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit |