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

请问下如何支持多个变体? #14

Open
wjianchen13 opened this issue Aug 19, 2024 · 1 comment
Open

请问下如何支持多个变体? #14

wjianchen13 opened this issue Aug 19, 2024 · 1 comment
Labels
question Further information is requested solved The issue having tag 'solved' are either resolved by the original poster (OP) or by another party.

Comments

@wjianchen13
Copy link

请问下我的app gradle配置了多个变体,怎样针对某一个变体进行打包aab?

@goldfish07 goldfish07 added the question Further information is requested label Aug 19, 2024
@goldfish07
Copy link
Owner

example

flavorDimensions = ["default"]
    productFlavors {
        production {
            dimension "default"
            buildConfigField "boolean", "PRODUCTION_ENABLED", "true"
            versionName "0.1.0-release-rc" + defaultConfig.versionCode
        }
        beta {
            dimension "default"
            buildConfigField "boolean", "PRODUCTION_ENABLED", "false"
            versionName "0.1.0-beta-rc" + defaultConfig.versionCode
        }
    }

for production flavor

./gradlew bundleProductionRelease
path: /home/gold/project-name/app/build/outputs/bundle/productionRelease/reschiper-app.aab

for beta flavor

./gradlew bundleBetaRelease
path: /home/gold/project-name/app/build/outputs/bundle/betaRelease/reschiper-app.aab

@goldfish07 goldfish07 added the solved The issue having tag 'solved' are either resolved by the original poster (OP) or by another party. label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested solved The issue having tag 'solved' are either resolved by the original poster (OP) or by another party.
Projects
None yet
Development

No branches or pull requests

2 participants