Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App name with single quote for Android #272

Open
wer-mathurin opened this issue Jul 10, 2024 · 0 comments
Open

App name with single quote for Android #272

wer-mathurin opened this issue Jul 10, 2024 · 0 comments

Comments

@wer-mathurin
Copy link

@AngeloAvv

The problem is when you have an app name with a single quote on ANDROID

flavors:
  dev:
    app:
      name: "app's name"
...

The generated gradle is

...
productFlavors {
       dev {
           dimension "flavor-type"
           applicationId "XXXXXXXXXX"
           resValue "string", "app_name", "app's name"
...

But it will fail (at least n AGT8) because the single quote in the string generate an error when building the android app.
The correct way of doing it, is adding the \:

...
productFlavors {
        dev {
            dimension "flavor-type"
            applicationId "XXXXXXXXXX"
            resValue "string", "app_name", "app\\'s name"
...

Thanks to the order of the processors we are able to do a WORKAROUND by adding manually a resValues :-)

flavors:
  dev:
    app:
      name: "app's name"

    android:
      applicationId: "XXXXXXXXX"
      icon: "XXXXXXXXXXXXX"
      resValues:
        app_name:
          type: "string"
          value: "app\\\\'s name"
...

Would be awesome to do it by default according to the platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant