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

applicationIdSuffix line could be confusing when setting up flavors #156

Open
nilsreichardt opened this issue Oct 3, 2023 · 1 comment

Comments

@nilsreichardt
Copy link
Contributor

nilsreichardt commented Oct 3, 2023

Description

When setting up flavors and you follow the Shorebird docs for Android, the docs mention the following the example:

defaultConfig {
    ...
}

+    flavorDimensions "track"
+    productFlavors {
+        internal {
+            dimension "track"
+            applicationIdSuffix ".internal"
+            manifestPlaceholders = [applicationLabel: "[Internal] Shorebird Example"]
+        }
+        stable {
+            dimension "track"
+            manifestPlaceholders = [applicationLabel: "Shorebird Example"]
+        }
+    }

buildTypes {
  ...
}

However, the line applicationIdSuffix ".internal" is optional and isn't required. I can also break the app if you have something like Firebase set up that depends on the package name.

In Discord, there was a customer who that this issue: https://discord.com/channels/1030243211995791380/1158737883511926784

Possible solution

A possible solution could be to mention that the applicationSuffix line is optional:

defaultConfig {
    ...
}

+    flavorDimensions "track"
+    productFlavors {
+        internal {
+            dimension "track"
+            // The `applicationIdSuffix ".internal"` line is optional and can be omitted.
+            // However, be cautious when using it with services like Firebase, which 
+            // may rely on consistent package names.
+            applicationIdSuffix ".internal"
+            manifestPlaceholders = [applicationLabel: "[Internal] Shorebird Example"]
+        }
+        stable {
+            dimension "track"
+            manifestPlaceholders = [applicationLabel: "Shorebird Example"]
+        }
+    }

buildTypes {
  ...
}
@eseidel
Copy link
Contributor

eseidel commented Oct 20, 2023

PRs welcome. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Punted
Development

No branches or pull requests

2 participants