summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@opera.com>2023-01-23 15:02:14 +0100
committerJoel Klinghed <the_jk@opera.com>2023-01-23 15:02:14 +0100
commit69bb8f513fb9357e92590d5d9a0021e34ddf6814 (patch)
tree02468feabfbe48b71df483c6f49e763896053ccb
parent92cc27f86abfb8ac307801c53b61c9ec4fe4220d (diff)
Fix access to internal components in kotlin
-rw-r--r--bin/flycheck-android-kotlin.py7
1 files changed, 2 insertions, 5 deletions
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()