mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-12-23 23:57:51 -05:00
scanner: fix gradle command match
When there is other flavors inserted before the command it should also match. Before this change only other flavors appended after the command is matched
This commit is contained in:
@@ -20,8 +20,8 @@ import itertools
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import stat
|
||||
import re
|
||||
import stat
|
||||
import sys
|
||||
import traceback
|
||||
import urllib.parse
|
||||
@@ -284,7 +284,7 @@ def get_gradle_compile_commands_without_catalog(build):
|
||||
|
||||
def get_gradle_compile_commands_with_catalog(build, prefix):
|
||||
return [
|
||||
re.compile(rf'\s*{c}.*\s*\(?{prefix}\.([a-z0-9.]+)', re.IGNORECASE)
|
||||
re.compile(rf"""\s*\S*{c}\S*\s*\(?{prefix}\.([a-z0-9.]+)""", re.IGNORECASE)
|
||||
for c in get_gradle_compile_commands(build)
|
||||
]
|
||||
|
||||
|
||||
@@ -6,4 +6,5 @@ plugins {
|
||||
|
||||
dependencies {
|
||||
implementation(libs.plugins.androidApplication.asLibraryDependency)
|
||||
"playImplementation"(libs.firebase.core)
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ class ScannerTest(SetUpTearDownMixin, unittest.TestCase):
|
||||
'se.manyver': 3,
|
||||
'lockfile.test': 1,
|
||||
'com.lolo.io.onelist': 6,
|
||||
'catalog.test': 22,
|
||||
'catalog.test': 23,
|
||||
}
|
||||
for d in (basedir / 'source-files').iterdir():
|
||||
build = fdroidserver.metadata.Build()
|
||||
|
||||
Reference in New Issue
Block a user