diff options
Diffstat (limited to 'platform/android/java/app')
-rw-r--r-- | platform/android/java/app/build.gradle | 2 | ||||
-rw-r--r-- | platform/android/java/app/config.gradle | 10 | ||||
-rw-r--r-- | platform/android/java/app/src/com/godot/game/GodotApp.java | 4 |
3 files changed, 13 insertions, 3 deletions
diff --git a/platform/android/java/app/build.gradle b/platform/android/java/app/build.gradle index 9f64c3dc8a..258ca9197a 100644 --- a/platform/android/java/app/build.gradle +++ b/platform/android/java/app/build.gradle @@ -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 diff --git a/platform/android/java/app/config.gradle b/platform/android/java/app/config.gradle index 20c3123221..862a954fac 100644 --- a/platform/android/java/app/config.gradle +++ b/platform/android/java/app/config.gradle @@ -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 +} diff --git a/platform/android/java/app/src/com/godot/game/GodotApp.java b/platform/android/java/app/src/com/godot/game/GodotApp.java index d7469a8765..eb884404cd 100644 --- a/platform/android/java/app/src/com/godot/game/GodotApp.java +++ b/platform/android/java/app/src/com/godot/game/GodotApp.java @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ |