1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-08-15 10:50:09 +02:00

support kotlin "*.gradle.kts" files in more places

closes #613
This commit is contained in:
Hans-Christoph Steiner 2020-02-13 09:54:55 +01:00
parent 9ae41cc1ff
commit 68b793e308
3 changed files with 5 additions and 4 deletions

View File

@ -1421,7 +1421,7 @@ def parse_androidmanifests(paths, app):
if app.builds and 'gradle' in app.builds[-1] and app.builds[-1].gradle:
flavour = app.builds[-1].gradle[-1]
if has_extension(path, 'gradle'):
if path.endswith('.gradle') or path.endswith('.gradle.kts'):
with open(path, 'r') as f:
android_plugin_file = False
inside_flavour_group = 0

View File

@ -243,7 +243,7 @@ def main():
app.RepoType = 'git'
app.UpdateCheckMode = "Tags"
if os.path.exists('build.gradle'):
if os.path.exists('build.gradle') or os.path.exists('build.gradle.kts'):
build.gradle = ['yes']
import git

View File

@ -825,9 +825,10 @@ def copy_triple_t_store_metadata(apps):
setting_gradle_pattern = re.compile(r"""\s*include\s+["']:([^"']+)["'](?:,[\n\s]*["']:([^"']+)["'])*""")
for packageName, app in apps.items():
settings_gradle = os.path.join('build', packageName, 'settings.gradle')
gradle_subdirs = set()
if os.path.exists(settings_gradle):
sg_list = glob.glob(os.path.join('build', packageName, 'settings.gradle*'))
if sg_list:
settings_gradle = sg_list[0]
with open(settings_gradle) as fp:
data = fp.read()
for matches in setting_gradle_pattern.findall(data):