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

@ -0,0 +1,15 @@
dependenies {
/// dependencies for app building
fossImplementation 'com.android.support:multidex:1.0.2'
implementation 'com.github.nextcloud:android-library:1.0.33'
devImplementation 'com.github.nextcloud:android-library:master-SNAPSHOT' // use always latest master
implementation "com.android.support:support-v4:${supportLibraryVersion}"
prodImplementation "com.android.support:design:${supportLibraryVersion}"
gplayImplementation 'com.jakewharton:disklrucache:2.0.2'
implementation "com.android.support:appcompat-v7:${supportLibraryVersion}"
gplayProdImplementation "com.android.support:cardview-v7:${supportLibraryVersion}"
implementation "com.android.support:exifinterface:${supportLibraryVersion}"
fossDevImplementation 'com.github.tobiasKaminsky:android-floating-action-button:1.10.2'
gplayDevImplementation 'com.github.albfernandez:juniversalchardet:v2.0.0'
fossProdImplementation 'com.google.code.findbugs:annotations:2.0.1'
}

View file

@ -107,12 +107,16 @@ class ScannerTest(unittest.TestCase):
('source-files/eu.siacs.conversations/build.gradle', 'free', 21),
('source-files/org.mozilla.rocket/app/build.gradle', 'focus', 40),
('source-files/com.jens.automation2/app/build.gradle', 'fdroidFlavor', 5),
('source-files/flavor.test/build.gradle', ['foss', 'prod'], 7),
]
for f, flavor, count in test_files:
i = 0
build = fdroidserver.metadata.Build()
build.gradle = [flavor]
if isinstance(flavor, list):
build.gradle = flavor
else:
build.gradle = [flavor]
regexs = fdroidserver.scanner.get_gradle_compile_commands_without_catalog(
build
)