Fix Android Studio builds.

(cherry picked from commit 1345e66935)
This commit is contained in:
ne0fhyk 2021-12-21 07:41:12 -08:00 committed by Rémi Verschelde
parent 942f15fa4e
commit 0448d4e26e
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 10 additions and 2 deletions

View File

@ -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.
*/