From 69bb8f513fb9357e92590d5d9a0021e34ddf6814 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Mon, 23 Jan 2023 15:02:14 +0100 Subject: Fix access to internal components in kotlin --- bin/flycheck-android-kotlin.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'bin/flycheck-android-kotlin.py') diff --git a/bin/flycheck-android-kotlin.py b/bin/flycheck-android-kotlin.py index 8a383db..c6a49e8 100644 --- a/bin/flycheck-android-kotlin.py +++ b/bin/flycheck-android-kotlin.py @@ -52,10 +52,6 @@ def filter_source_files(files): """Remove any item not looking like a kotlin or java source file.""" return [f for f in files if f.endswith('.kt') or f.endswith('.java')] -def filter_java_source_files(files): - """Remove any item not looking like a java source file.""" - return [f for f in files if f.endswith('.java')] - def cleanup_output(tmp, real): """Remove any file in tmp that is older than the one in real""" offset = len(tmp) @@ -95,10 +91,11 @@ def run_kotlinc(cp, files, output, args, sourcefile, outdir): command.extend(['-d', output]) command.extend([arg for arg in args if not arg.startswith('-Xplugin=')]) command.append(sourcefile) + # Must include all source files or internal access will fail if outdir: with tempfile.NamedTemporaryFile(mode='w') as f: command.append('@' + f.name) - for source in filter_java_source_files(files): + for source in filter_source_files(files): f.write(source) f.write('\n') f.flush() -- cgit v1.2.3-70-g09d2