Skip to content

Commit 67f6a0d

Browse files
committed
Merge pull request godotengine#113469 from m4gr3d/deprecate_dev_buildtype
Deprecate the Android studio `dev` buildtype
2 parents a85bf00 + 1054250 commit 67f6a0d

7 files changed

Lines changed: 24 additions & 63 deletions

File tree

platform/android/SCsub

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ elif sys.platform.startswith("win"):
8282
host_subpath = "windows"
8383

8484
if lib_arch_dir != "" and host_subpath != "":
85-
if env.dev_build:
86-
lib_type_dir = "dev"
87-
elif env.debug_features:
85+
if env.debug_features:
8886
if env.editor_build and env["store_release"]:
8987
lib_type_dir = "release"
9088
else:

platform/android/java/app/build.gradle

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ allprojects {
2727
}
2828

2929
configurations {
30-
// Initializes a placeholder for the devImplementation dependency configuration.
31-
devImplementation {}
3230
// Initializes a placeholder for the monoImplementation dependency configuration.
3331
monoImplementation {}
3432
}
@@ -52,7 +50,6 @@ dependencies {
5250
// Godot gradle build mode. In this scenario this project is the only one around and the Godot
5351
// library is available through the pre-generated godot-lib.*.aar android archive files.
5452
debugImplementation fileTree(dir: 'libs/debug', include: ['**/*.jar', '*.aar'])
55-
devImplementation fileTree(dir: 'libs/dev', include: ['**/*.jar', '*.aar'])
5653
releaseImplementation fileTree(dir: 'libs/release', include: ['**/*.jar', '*.aar'])
5754
}
5855

@@ -205,18 +202,6 @@ android {
205202
}
206203
}
207204

208-
dev {
209-
initWith debug
210-
// Signing and zip-aligning are skipped for prebuilt builds, but
211-
// performed for Godot gradle builds.
212-
zipAlignEnabled shouldZipAlign()
213-
if (shouldSign()) {
214-
signingConfig signingConfigs.debug
215-
} else {
216-
signingConfig null
217-
}
218-
}
219-
220205
release {
221206
// Signing and zip-aligning are skipped for prebuilt builds, but
222207
// performed for Godot gradle builds.
@@ -250,7 +235,6 @@ android {
250235
sourceSets {
251236
main.res.srcDirs += ['res']
252237
debug.jniLibs.srcDirs = ['libs/debug', 'libs/debug/vulkan_validation_layers']
253-
dev.jniLibs.srcDirs = ['libs/dev']
254238
release.jniLibs.srcDirs = ['libs/release']
255239
}
256240

@@ -329,9 +313,6 @@ module, so we're ensuring the ':app:preBuild' task is set to run after those tas
329313
if (rootProject.tasks.findByPath("copyDebugAARToAppModule") != null) {
330314
preBuild.mustRunAfter(rootProject.tasks.named("copyDebugAARToAppModule"))
331315
}
332-
if (rootProject.tasks.findByPath("copyDevAARToAppModule") != null) {
333-
preBuild.mustRunAfter(rootProject.tasks.named("copyDevAARToAppModule"))
334-
}
335316
if (rootProject.tasks.findByPath("copyReleaseAARToAppModule") != null) {
336317
preBuild.mustRunAfter(rootProject.tasks.named("copyReleaseAARToAppModule"))
337318
}

platform/android/java/build.gradle

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ ext {
2727
supportedFlavors = ["editor", "template"]
2828
supportedAndroidDistributions = ["android", "horizonos", "picoos"]
2929
supportedFlavorsBuildTypes = [
30-
"editor": ["dev", "debug", "release"],
31-
"template": ["dev", "debug", "release"]
30+
"editor": ["debug", "release"],
31+
"template": ["debug", "release"]
3232
]
3333
supportedEditions = ["standard", "mono"]
3434

@@ -50,11 +50,11 @@ def getSconsTaskName(String flavor, String buildType, String abi) {
5050

5151
/**
5252
* Generate Godot gradle build template by zipping the source files from the app directory, as well
53-
* as the AAR files generated by 'copyDebugAAR', 'copyDevAAR' and 'copyReleaseAAR'.
53+
* as the AAR files generated by 'copyDebugAAR' and 'copyReleaseAAR'.
5454
* The zip file also includes some gradle tools to enable gradle builds from the Godot Editor.
5555
*/
5656
task zipGradleBuild(type: Zip) {
57-
onlyIf { generateGodotTemplates.state.executed || generateGodotMonoTemplates.state.executed || generateDevTemplate.state.executed }
57+
onlyIf { generateGodotTemplates.state.executed || generateGodotMonoTemplates.state.executed }
5858
doFirst {
5959
logger.lifecycle("Generating Godot gradle build template")
6060
}
@@ -124,9 +124,6 @@ def generateBuildTasks(String flavor = "template", String edition = "standard",
124124
File targetLibs = new File(libsDir + target)
125125

126126
String targetSuffix = target
127-
if (target == "dev") {
128-
targetSuffix = "debug.dev"
129-
}
130127

131128
if (!excludeSconsBuildTasks || (targetLibs != null
132129
&& targetLibs.isDirectory()
@@ -315,26 +312,20 @@ task cleanGodotTemplates(type: Delete) {
315312

316313
// Delete the Godot templates in the Godot bin directory
317314
delete("$binDir/android_debug.apk")
318-
delete("$binDir/android_dev.apk")
319315
delete("$binDir/android_release.apk")
320316
delete("$binDir/android_monoDebug.apk")
321-
delete("$binDir/android_monoDev.apk")
322317
delete("$binDir/android_monoRelease.apk")
323318
delete("$binDir/android_source.zip")
324319
delete("$binDir/godot-lib.template_debug.aar")
325-
delete("$binDir/godot-lib.template_debug.dev.aar")
326320
delete("$binDir/godot-lib.template_release.aar")
327321

328322
// Cover deletion for the libs using the previous naming scheme
329323
delete("$binDir/godot-lib.debug.aar")
330-
delete("$binDir/godot-lib.dev.aar")
331324
delete("$binDir/godot-lib.release.aar")
332325

333326
// Delete the native debug symbols files.
334327
delete("$binDir/android-editor-debug-native-symbols.zip")
335-
delete("$binDir/android-editor-dev-native-symbols.zip")
336328
delete("$binDir/android-editor-release-native-symbols.zip")
337329
delete("$binDir/android-template-debug-native-symbols.zip")
338-
delete("$binDir/android-template-dev-native-symbols.zip")
339330
delete("$binDir/android-template-release-native-symbols.zip")
340331
}

platform/android/java/editor/build.gradle

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,7 @@ android {
131131
}
132132

133133
buildTypes {
134-
dev {
135-
initWith debug
136-
applicationIdSuffix ".dev"
137-
manifestPlaceholders += [editorBuildSuffix: " (dev)"]
138-
}
139-
140134
debug {
141-
initWith release
142135
applicationIdSuffix ".debug"
143136
manifestPlaceholders += [editorBuildSuffix: " (debug)"]
144137
signingConfig signingConfigs.debug
@@ -147,6 +140,14 @@ android {
147140
release {
148141
if (hasReleaseSigningConfigs()) {
149142
signingConfig signingConfigs.release
143+
} else {
144+
// We default to the debug signingConfigs when the release signing configs are not
145+
// available (e.g: development in Android Studio).
146+
signingConfig signingConfigs.debug
147+
// In addition, we update the application ID to allow installing an Android studio release build
148+
// side by side with a production build from the store.
149+
applicationIdSuffix ".release"
150+
manifestPlaceholders += [editorBuildSuffix: " (release)"]
150151
}
151152
}
152153
}

platform/android/java/editor/src/main/java/org/godotengine/editor/BaseGodotEditor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ abstract class BaseGodotEditor : GodotActivity(), GameMenuFragment.GameMenuListe
254254

255255
editorMessageDispatcher.parseStartIntent(packageManager, intent)
256256

257-
if (BuildConfig.BUILD_TYPE == "dev" && WAIT_FOR_DEBUGGER) {
257+
if (BuildConfig.BUILD_TYPE == "debug" && WAIT_FOR_DEBUGGER) {
258258
Debug.waitForDebugger()
259259
}
260260

@@ -404,7 +404,7 @@ abstract class BaseGodotEditor : GodotActivity(), GameMenuFragment.GameMenuListe
404404

405405
override fun getCommandLine(): MutableList<String> {
406406
val params = super.getCommandLine()
407-
if (BuildConfig.BUILD_TYPE == "dev" && !params.contains("--benchmark")) {
407+
if (BuildConfig.BUILD_TYPE == "debug" && !params.contains("--benchmark")) {
408408
params.add("--benchmark")
409409
}
410410
return params

platform/android/java/lib/build.gradle

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ android {
4848
buildConfig = true
4949
}
5050

51-
buildTypes {
52-
dev {
53-
initWith debug
54-
}
55-
}
56-
5751
flavorDimensions = ["products"]
5852
productFlavors {
5953
editor {}
@@ -79,13 +73,11 @@ android {
7973

8074
sourceSets {
8175
debug.jniLibs.srcDirs = ['libs/debug']
82-
dev.jniLibs.srcDirs = ['libs/dev']
8376
release.jniLibs.srcDirs = ['libs/release']
8477

8578
// Editor jni library
8679
editorRelease.jniLibs.srcDirs = ['libs/tools/release']
8780
editorDebug.jniLibs.srcDirs = ['libs/tools/debug']
88-
editorDev.jniLibs.srcDirs = ['libs/tools/dev']
8981
}
9082

9183
libraryVariants.all { variant ->
@@ -99,22 +91,23 @@ android {
9991
throw new GradleException("Invalid build type: $buildType")
10092
}
10193

102-
boolean devBuild = buildType == "dev"
103-
boolean debugSymbols = devBuild
104-
boolean runTests = devBuild
94+
boolean debugBuild = buildType == "debug"
95+
boolean debugSymbols = debugBuild
96+
boolean runTests = debugBuild
10597
boolean storeRelease = buildType == "release"
10698
boolean productionBuild = storeRelease
10799

108100
def sconsTarget = flavorName
109101
if (sconsTarget == "template") {
110102
// Tests are not supported on template builds
111103
runTests = false
104+
105+
//noinspection GroovyFallthrough
112106
switch (buildType) {
113107
case "release":
114108
sconsTarget += "_release"
115109
break
116110
case "debug":
117-
case "dev":
118111
default:
119112
sconsTarget += "_debug"
120113
break
@@ -123,9 +116,6 @@ android {
123116

124117
// Update the name of the generated library
125118
def outputSuffix = "${sconsTarget}"
126-
if (devBuild) {
127-
outputSuffix = "${outputSuffix}.dev"
128-
}
129119
variant.outputs.all { output ->
130120
output.outputFileName = "godot-lib.${outputSuffix}.aar"
131121
}
@@ -168,7 +158,7 @@ android {
168158
def taskName = getSconsTaskName(flavorName, buildType, selectedAbi)
169159
tasks.create(name: taskName, type: Exec) {
170160
executable sconsExecutableFile.absolutePath
171-
args "--directory=${pathToRootDir}", "platform=android", "store_release=${storeRelease}", "production=${productionBuild}", "dev_mode=${devBuild}", "dev_build=${devBuild}", "debug_symbols=${debugSymbols}", "tests=${runTests}", "target=${sconsTarget}", "arch=${selectedAbi}", "-j" + Runtime.runtime.availableProcessors()
161+
args "--directory=${pathToRootDir}", "platform=android", "store_release=${storeRelease}", "production=${productionBuild}", "dev_mode=${debugBuild}", "dev_build=${debugBuild}", "debug_symbols=${debugSymbols}", "tests=${runTests}", "target=${sconsTarget}", "arch=${selectedAbi}", "-j" + Runtime.runtime.availableProcessors()
172162
}
173163

174164
// Schedule the tasks so the generated libs are present before the aar file is packaged.

platform/android/java/lib/src/main/java/org/godotengine/godot/utils/BenchmarkUtils.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private val benchmarkTracker = Collections.synchronizedMap(LinkedHashMap<Pair<St
6464
* Note: Only enabled on 'editorDev' build variant.
6565
*/
6666
fun beginBenchmarkMeasure(scope: String, label: String) {
67-
if (BuildConfig.FLAVOR != "editor" || BuildConfig.BUILD_TYPE != "dev") {
67+
if (BuildConfig.FLAVOR != "editor" || BuildConfig.BUILD_TYPE != "debug") {
6868
return
6969
}
7070
val key = Pair(scope, label)
@@ -84,7 +84,7 @@ fun beginBenchmarkMeasure(scope: String, label: String) {
8484
*/
8585
@JvmOverloads
8686
fun endBenchmarkMeasure(scope: String, label: String, dumpBenchmark: Boolean = false) {
87-
if (BuildConfig.FLAVOR != "editor" || BuildConfig.BUILD_TYPE != "dev") {
87+
if (BuildConfig.FLAVOR != "editor" || BuildConfig.BUILD_TYPE != "debug") {
8888
return
8989
}
9090
val key = Pair(scope, label)
@@ -109,7 +109,7 @@ fun endBenchmarkMeasure(scope: String, label: String, dumpBenchmark: Boolean = f
109109
*/
110110
@JvmOverloads
111111
fun dumpBenchmark(fileAccessHandler: FileAccessHandler? = null, filepath: String? = benchmarkFile) {
112-
if (BuildConfig.FLAVOR != "editor" || BuildConfig.BUILD_TYPE != "dev") {
112+
if (BuildConfig.FLAVOR != "editor" || BuildConfig.BUILD_TYPE != "debug") {
113113
return
114114
}
115115
if (!useBenchmark || benchmarkTracker.isEmpty()) {

0 commit comments

Comments
 (0)