fix(setup): skip admob plugin for normal builds#2118
Conversation
Greptile SummaryThis PR adds conditional logic to
Confidence Score: 4/5The change is safe to merge; the admob-skip path is straightforward and the core plugin installation loop is unchanged for all other plugins. The logic for detecting the paid build and skipping admob works correctly for the standard config.xml double-quoted attribute format. Two small robustness gaps exist: readFileSync has no try-catch so a missing config.xml surfaces as an unhelpful crash, and the regex won't match single-quoted XML attributes, silently falling back to including admob in the paid build. Neither affects the happy path but could cause confusion in edge setups. utils/setup.js — specifically the isPaidVersion function's error handling and the attribute-quoting assumption in the regex. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[setup.js starts] --> B[installDependencies]
B --> C[cordova platform add android]
C --> D[cordova plugin add buildinfo / device / file]
D --> E[isPaidVersion read config.xml extract widget id]
E --> F{id === com.foxdebug.acode?}
F -->|Yes - paid build| G[shouldSkipAdmob = true]
F -->|No - other build| H[shouldSkipAdmob = false]
G --> I[readdirSync src/plugins]
H --> I
I --> J{for each plugin}
J --> K{platform file or dot-file?}
K -->|Yes| L[skip]
K -->|No| M{shouldSkipAdmob and plugin === admob?}
M -->|Yes| N[skip admob]
M -->|No| O[cordova plugin add ./src/plugins/plugin]
O --> J
N --> J
Reviews (1): Last reviewed commit: "fix(setup): skip admob plugin for normal..." | Re-trigger Greptile |
No description provided.