From cdb899575e60105c35656ebc305352ae7306b49e Mon Sep 17 00:00:00 2001 From: neckfire Date: Mon, 13 Jul 2026 09:27:40 +0200 Subject: [PATCH] =?UTF-8?q?ci:=20ins=C3=A8re=20keystoreProperties=20apr?= =?UTF-8?q?=C3=A8s=20plugins{}=20(build.gradle=203.24)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 --- tool/patch_android.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tool/patch_android.py b/tool/patch_android.py index 4d6b54b..2b99963 100644 --- a/tool/patch_android.py +++ b/tool/patch_android.py @@ -33,12 +33,16 @@ open(man, "w").write(s) # 3) build.gradle : signature + schéma OIDC gr = "android/app/build.gradle" s = open(gr).read() +# ⚠️ Rien n'est autorisé AVANT le bloc plugins {} → on insère juste avant `android {` if "keystoreProperties" not in s: - s = ( + s = s.replace( + "android {", 'def keystoreProperties = new Properties()\n' 'def keystorePropertiesFile = rootProject.file("key.properties")\n' 'if (keystorePropertiesFile.exists()) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) }\n\n' - ) + s + 'android {', + 1, + ) if "appAuthRedirectScheme" not in s: s = s.replace( "defaultConfig {",