From 2dbf11e04a58b2383982250cf9b51020920be25e Mon Sep 17 00:00:00 2001 From: risadmin_prod Date: Mon, 14 Sep 2026 12:23:04 +0000 Subject: [PATCH] Update android/build.gradle --- android/build.gradle | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 4557cbe..505128a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -28,12 +28,12 @@ subprojects { tasks.register("clean", Delete) { delete rootProject.buildDir } -subprojects { - afterEvaluate { project -> - if (project.hasProperty('android')) { - def androidExt = project.extensions.findByName('android') +subprojects { proj -> + def fixNamespace = { + if (proj.hasProperty('android')) { + def androidExt = proj.extensions.findByName('android') if (androidExt != null && androidExt.hasProperty('namespace') && (androidExt.namespace == null || androidExt.namespace == '')) { - def manifestFile = project.file('src/main/AndroidManifest.xml') + def manifestFile = proj.file('src/main/AndroidManifest.xml') if (manifestFile.exists()) { def manifestText = manifestFile.text def matcher = manifestText =~ /package="([^"]+)"/ @@ -44,4 +44,9 @@ subprojects { } } } + if (proj.state.executed) { + fixNamespace() + } else { + proj.afterEvaluate { fixNamespace() } + } } \ No newline at end of file