You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Replace the android.defaultConfig.applicationId in build.gradle with the package/unique_name.
This commit is contained in:
@@ -51,7 +51,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
// Feel free to modify the application id to your own.
|
||||
applicationId "com.godot.game"
|
||||
applicationId getExportPackageName()
|
||||
minSdkVersion versions.minSdk
|
||||
targetSdkVersion versions.targetSdk
|
||||
//CHUNK_ANDROID_DEFAULTCONFIG_BEGIN
|
||||
|
||||
@@ -10,3 +10,13 @@ ext.versions = [
|
||||
ext.libraries = [
|
||||
androidGradlePlugin : "com.android.tools.build:gradle:$versions.androidGradlePlugin"
|
||||
]
|
||||
|
||||
ext.getExportPackageName = { ->
|
||||
// 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user