summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorne0fhyk <fhuyakou@gmail.com>2021-12-21 07:41:12 -0800
committerne0fhyk <fhuyakou@gmail.com>2021-12-21 07:41:12 -0800
commit1345e6693564cb57abd6e471e5e5a14a4950081b (patch)
tree73d72d8396209d1ff16eb3df435aee1d9fc524fd /platform/android
parent489f11ee0cbbb90f4f629aa7fd846078148aaa8e (diff)
Fix Android Studio builds.
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/java/build.gradle12
1 files changed, 10 insertions, 2 deletions
diff --git a/platform/android/java/build.gradle b/platform/android/java/build.gradle
index efdcc6c77b..ac008edbed 100644
--- a/platform/android/java/build.gradle
+++ b/platform/android/java/build.gradle
@@ -124,8 +124,11 @@ task zipCustomBuild(type: Zip) {
def templateExcludedBuildTask() {
// We exclude these gradle tasks so we can run the scons command manually.
def excludedTasks = []
- for (String buildType : supportedTargets) {
- excludedTasks += ":lib:" + getSconsTaskName(buildType)
+ if (!isAndroidStudio()) {
+ logger.lifecycle("Excluding Android studio build tasks")
+ for (String buildType : supportedTargets) {
+ excludedTasks += ":lib:" + getSconsTaskName(buildType)
+ }
}
return excludedTasks
}
@@ -155,6 +158,11 @@ def templateBuildTasks() {
return tasks
}
+def isAndroidStudio() {
+ def sysProps = System.getProperties()
+ return sysProps != null && sysProps['idea.platform.prefix'] != null
+}
+
/**
* Master task used to coordinate the tasks defined above to generate the set of Godot templates.
*/