From eba71982c6cb3da47edd3abf09d9faa112b63106 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Sun, 21 Sep 2025 16:36:26 -0400 Subject: [PATCH] Also validate ADMOD_APPID in the project file. --- project.hxp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/project.hxp b/project.hxp index cae3feceb..bf238b618 100644 --- a/project.hxp +++ b/project.hxp @@ -1373,7 +1373,15 @@ class Project extends HXProject { if (envConfig == null) return; - setenv("ADMOB_APPID", Std.string(envConfig.get('ADMOB_APP_ID'))); + if (FEATURE_MOBILE_ADVERTISEMENTS.isEnabled(this)) { + var appId:Null = Std.string(envConfig.get('ADMOB_APP_ID')); + + if (appId != null && appId != "null") { + setenv("ADMOB_APPID", appId); + } else { + error("ADMOB_APP_ID is not defined in the environment. Populate the .env file in your project root or build with -DNO_FEATURE_MOBILE_ADVERTISEMENTS"); + } + } } //