2019-09-03 02:31:51 +02:00
|
|
|
ext.versions = [
|
2020-03-25 17:00:37 +01:00
|
|
|
androidGradlePlugin: '3.6.0',
|
|
|
|
compileSdk : 29,
|
2019-10-18 18:59:04 +02:00
|
|
|
minSdk : 18,
|
2020-03-25 17:00:37 +01:00
|
|
|
targetSdk : 29,
|
|
|
|
buildTools : '29.0.1',
|
2019-10-18 18:59:04 +02:00
|
|
|
supportCoreUtils : '28.0.0',
|
2020-03-27 06:42:18 +01:00
|
|
|
kotlinVersion : '1.3.61',
|
2019-10-18 18:59:04 +02:00
|
|
|
v4Support : '28.0.0'
|
2019-09-03 02:31:51 +02:00
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
ext.libraries = [
|
2019-10-18 18:59:04 +02:00
|
|
|
androidGradlePlugin: "com.android.tools.build:gradle:$versions.androidGradlePlugin",
|
|
|
|
supportCoreUtils : "com.android.support:support-core-utils:$versions.supportCoreUtils",
|
2020-03-27 06:42:18 +01:00
|
|
|
kotlinGradlePlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlinVersion",
|
|
|
|
kotlinStdLib : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlinVersion",
|
2019-10-18 18:59:04 +02:00
|
|
|
v4Support : "com.android.support:support-v4:$versions.v4Support"
|
2019-09-03 02:31:51 +02:00
|
|
|
]
|
2019-12-13 01:52:57 +01:00
|
|
|
|
|
|
|
ext.getExportPackageName = { ->
|
2019-10-18 18:59:04 +02:00
|
|
|
// Retrieve the app id from the project property set by the Godot build command.
|
|
|
|
String appId = project.hasProperty("export_package_name") ? project.property("export_package_name") : ""
|
|
|
|
// Check if the app id is valid, otherwise use the default.
|
|
|
|
if (appId == null || appId.isEmpty()) {
|
|
|
|
appId = "com.godot.game"
|
|
|
|
}
|
|
|
|
return appId
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Parse the project properties for the 'custom_template_plugins' property and return
|
|
|
|
* their binaries for inclusion in the build dependencies.
|
|
|
|
*
|
|
|
|
* The listed plugins must have their binaries in the project plugins directory.
|
|
|
|
*/
|
|
|
|
ext.getGodotPluginsBinaries = { ->
|
|
|
|
String[] binDeps = []
|
|
|
|
|
|
|
|
// Retrieve the list of enabled plugins.
|
|
|
|
if (project.hasProperty("custom_template_plugins")) {
|
|
|
|
String pluginsList = project.property("custom_template_plugins")
|
|
|
|
if (pluginsList != null && !pluginsList.trim().isEmpty()) {
|
|
|
|
for (String plugin : pluginsList.split(",")) {
|
|
|
|
binDeps += plugin.trim() + "*.aar"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return binDeps
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Parse the project properties for the 'custom_template_plugins_dir' property and return
|
|
|
|
* its value.
|
|
|
|
*
|
|
|
|
* The returned value is the directory containing user plugins.
|
|
|
|
*/
|
|
|
|
ext.getGodotPluginsDirectory = { ->
|
|
|
|
// The plugins directory is provided by the 'custom_template_plugins_dir' property.
|
|
|
|
String pluginsDir = project.hasProperty("custom_template_plugins_dir")
|
|
|
|
? project.property("custom_template_plugins_dir")
|
|
|
|
: ""
|
|
|
|
|
|
|
|
return pluginsDir
|
2019-12-13 01:52:57 +01:00
|
|
|
}
|