Closed eseidel closed 7 months ago
@bryanoltman looks like this is an error in our handling of flavor names? I recall we do some camel-case to snake-case conversion that maybe gets confused here?
@AbhijithKonnayil we released this in 1.0.1 but ended up reverting it in 1.0.2. We'd love to work with you to figure out what the right fix is here?
Reverted https://github.com/shorebirdtech/shorebird/pull/1861 due to a customer report of a camel case flavor name (retailStaging
) being incorrectly converted to kebab case (retail-staging
)
I suspect we need to compare the two gradle configs that are failing (one with the patch, one without the patch) and figure out what is the right change to make to make both pass.
Our previous (and now current) behavior is working using the latest Shorebird and latest version of Flutter (1.0.2 and 3.19.5, respectively). I updated our flavors example in https://github.com/shorebirdtech/samples/ to use stableFlavor
as a flavor name and it was not converted to kebab case:
Your next step is to upload the app bundle to the Play Store:
/Users/bryanoltman/shorebirdtech/samples/flavors/build/app/outputs/bundle/stableFlavorRelease/app-stableFlavor-release.aab
@AbhijithKonnayil I'd be curious to know
shorebird doctor -v
shows you.@eseidel can we do pick first aab file that is present in that folder?. Like *.aab like that? @AbhijithKonnayil
That seems sort of error-prone – what if there are multiple aabs in the directory? How would we know we're choosing the right one?
What I'd really like to know is what Gradle/Flutter setting is causing the flavor names to be converted to kebab case and address that
@AbhijithKonnayil I'd be curious to know
- Which Flutter version was used to generate the project (if you remember)
- If you've made any changes to your build.gradle or settings.gradle files since generating the project
- What
shorebird doctor -v
shows you.
3.19.4
I dont remember adding any thing else other than the product flavour config which is as follows
flavorDimensions "environment", "country"
productFlavors {
dev {
dimension "environment"
}
stg {
dimension "environment"
}
prod {
dimension "environment"
}
india {
applicationIdSuffix ".in"
dimension "country"
manifestPlaceholders += [countryCode:"in"]
manifestPlaceholders = [autoVerifyValue: true]
}
global {
applicationIdSuffix ".gl"
dimension "country"
manifestPlaceholders += [countryCode:"global"]
manifestPlaceholders = [autoVerifyValue: false]
}
}
3. I dont have the out put of `shorebird doctor -v` for the version when I gave the pr, here is the result of the same in `v 1.0.2` for which the the release issue exist
<img width="1210" alt="Screenshot 2024-04-22 at 12 14 23 PM" src="https://github.com/shorebirdtech/shorebird/assets/25204682/b67b4049-501c-4f2c-8ae0-cbd18be4fad7">
Our previous (and now current) behavior is working using the latest Shorebird and latest version of Flutter (1.0.2 and 3.19.5, respectively). I updated our flavors example in https://github.com/shorebirdtech/samples/ to use
stableFlavor
as a flavor name and it was not converted to kebab case:Your next step is to upload the app bundle to the Play Store: /Users/bryanoltman/shorebirdtech/samples/flavors/build/app/outputs/bundle/stableFlavorRelease/app-stableFlavor-release.aab
can you share the command you used for that release
Reverted #1861 due to a customer report of a camel case flavor name (
retailStaging
) being incorrectly converted to kebab case (retail-staging
)
can you give somemore context on it, like screenshot of sample output
Our previous (and now current) behavior is working using the latest Shorebird and latest version of Flutter (1.0.2 and 3.19.5, respectively). I updated our flavors example in https://github.com/shorebirdtech/samples/ to use
stableFlavor
as a flavor name and it was not converted to kebab case:Your next step is to upload the app bundle to the Play Store: /Users/bryanoltman/shorebirdtech/samples/flavors/build/app/outputs/bundle/stableFlavorRelease/app-stableFlavor-release.aab
can you share the command you used for that release
I ran shorebird release android --flavor stableFlavor
@AbhijithKonnayil I'd be curious to know
- Which Flutter version was used to generate the project (if you remember)
- If you've made any changes to your build.gradle or settings.gradle files since generating the project
- What
shorebird doctor -v
shows you.
- As you can see in the screenshot shared at the starting of the ticket, flutter version is
3.19.4
- I dont remember adding any thing else other than the product flavour config which is as follows
flavorDimensions "environment", "country" productFlavors { dev { dimension "environment" } stg { dimension "environment" } prod { dimension "environment" } india { applicationIdSuffix ".in" dimension "country" manifestPlaceholders += [countryCode:"in"] manifestPlaceholders = [autoVerifyValue: true] } global { applicationIdSuffix ".gl" dimension "country" manifestPlaceholders += [countryCode:"global"] manifestPlaceholders = [autoVerifyValue: false] } }
- I dont have the out put of
shorebird doctor -v
for the version when I gave the pr, here is the result of the same inv 1.0.2
for which the the release issue exist
Looking at this, it appears that prod and global are two different flavors. Can you share the command you ran to trigger the original issue above?
@AbhijithKonnayil I'd be curious to know
- Which Flutter version was used to generate the project (if you remember)
- If you've made any changes to your build.gradle or settings.gradle files since generating the project
- What
shorebird doctor -v
shows you.
- As you can see in the screenshot shared at the starting of the ticket, flutter version is
3.19.4
- I dont remember adding any thing else other than the product flavour config which is as follows
flavorDimensions "environment", "country" productFlavors { dev { dimension "environment" } stg { dimension "environment" } prod { dimension "environment" } india { applicationIdSuffix ".in" dimension "country" manifestPlaceholders += [countryCode:"in"] manifestPlaceholders = [autoVerifyValue: true] } global { applicationIdSuffix ".gl" dimension "country" manifestPlaceholders += [countryCode:"global"] manifestPlaceholders = [autoVerifyValue: false] } }
- I dont have the out put of
shorebird doctor -v
for the version when I gave the pr, here is the result of the same inv 1.0.2
for which the the release issue existLooking at this, it appears that prod and global are two different flavors. Can you share the command you ran to trigger the original issue above?
The screenshot is not uploaded properly, i guess.
The commond I used is in the screenshot shared at the starting
shorebird release android --flavor prodGlobal --target lib/mains/main_prod_global.dart
Oh interesting, I didn't see that you have flavors across multiple dimensions. Let me experiment with that locally and see if I can reproduce your issue.
Updated the issue description. It seems like we aren't handling the multi-dimensional flavor case correctly. Will fix as soon as we can.
With flavors across multiple dimensions, our release command cannot find the generated aab.
For example:
With this, running
shorebird release android --flavor stableGlobal
generates an aab atbuild/app/outputs/bundle/stableGlobalRelease/app-stable-global-release.aab
, but our tool fails with:Changing
stable
andglobal
tostableFlavor
andglobalFlavor
yields:✗ Failed to build: Gradle build failed to produce an .aab file. It's likely that this file was generated under /Users/bryanoltman/shorebirdtech/samples/flavors/build, but the tool couldn't find it.
The output:
Originally posted by @AbhijithKonnayil in https://github.com/shorebirdtech/shorebird/issues/515#issuecomment-2022555249