Merge pull request #56132 from m4gr3d/fix_android_studio_builds

Fix Android Studio builds
This commit is contained in:
Fredia Huya-Kouadio 2022-01-03 09:19:21 -08:00 committed by GitHub
commit a8a20a0e02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,9 +124,12 @@ task zipCustomBuild(type: Zip) {
def templateExcludedBuildTask() { def templateExcludedBuildTask() {
// We exclude these gradle tasks so we can run the scons command manually. // We exclude these gradle tasks so we can run the scons command manually.
def excludedTasks = [] def excludedTasks = []
if (!isAndroidStudio()) {
logger.lifecycle("Excluding Android studio build tasks")
for (String buildType : supportedTargets) { for (String buildType : supportedTargets) {
excludedTasks += ":lib:" + getSconsTaskName(buildType) excludedTasks += ":lib:" + getSconsTaskName(buildType)
} }
}
return excludedTasks return excludedTasks
} }
@ -155,6 +158,11 @@ def templateBuildTasks() {
return tasks 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. * Master task used to coordinate the tasks defined above to generate the set of Godot templates.
*/ */