calculate all combinations of gradle flavors

This commit is contained in:
linsui 2025-04-26 01:58:20 +08:00 committed by Hans-Christoph Steiner
parent e957583337
commit a5d966bf0f
5 changed files with 29 additions and 5 deletions

View file

@ -270,9 +270,10 @@ def get_gradle_compile_commands(build):
'runtimeOnly',
]
buildTypes = ['', 'release']
flavors = ['']
if build.gradle and build.gradle != ['yes']:
flavors += build.gradle
flavors = common.calculate_gradle_flavor_combination(build.gradle)
else:
flavors = ['']
return [''.join(c) for c in itertools.product(flavors, buildTypes, compileCommands)]

View file

@ -1180,13 +1180,16 @@ def insert_localized_app_metadata(apps):
destdir = os.path.join('repo', packageName, locale)
# flavors specified in build receipt
build_flavors = ""
build_flavors = []
if (
apps[packageName]
and len(apps[packageName].get('Builds', [])) > 0
and 'gradle' in apps[packageName]['Builds'][-1]
and apps[packageName]['Builds'][-1]['gradle'] != ['yes']
):
build_flavors = apps[packageName]['Builds'][-1]['gradle']
build_flavors = common.calculate_gradle_flavor_combination(
apps[packageName]['Builds'][-1]['gradle']
)
if len(segments) >= 5 and segments[4] == "fastlane" and segments[3] not in build_flavors:
logging.debug("ignoring due to wrong flavor")