Substitute ${ENV_VAR} placeholders in Android plugin meta-data#167
Open
voicecode-bv wants to merge 1 commit into
Open
Substitute ${ENV_VAR} placeholders in Android plugin meta-data#167voicecode-bv wants to merge 1 commit into
voicecode-bv wants to merge 1 commit into
Conversation
The iOS compiler already resolves ${ENV_VAR} placeholders in info_plist
values, but the Android compiler wrote meta-data values verbatim. A plugin
declaring <meta-data android:value="${SOME_KEY}"> therefore shipped the
literal placeholder into AndroidManifest.xml, where the manifest merger then
failed with "requires a placeholder substitution but no value is provided".
Resolve placeholders for both application-level (buildMetaDataEntry) and
component-level (buildComponentMetaData) string meta-data values, mirroring
the existing iOS info_plist behaviour. Adds tests for both paths.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The iOS compiler resolves
${ENV_VAR}placeholders ininfo_plistvalues (IOSPluginCompiler::substituteEnvPlaceholders), but the Android compiler writesmeta_datavalues verbatim. A plugin declaring:ships the literal
${SOME_KEY}intoAndroidManifest.xml, where the manifest merger then fails the build with:Fix
Resolve
${ENV_VAR}placeholders for both application-level (buildMetaDataEntry) and component-level (buildComponentMetaData) string meta-data values, mirroring the existing iOSinfo_plistbehaviour. Unset variables are left as-is, matchingsubstituteEnvPlaceholders' documented "validation will catch this" contract.Tests
Adds two tests covering application- and service-level meta-data substitution. The full
AndroidCompilerTestsuite (33 tests) passes.