Skip to content

Commit

Permalink
WIP: bundle aircompressor in kotlin extractor jar
Browse files Browse the repository at this point in the history
This is needed for the consistency queries to extract successfully, e.g.

```
codeql test run --consistency-queries=ql/java/ql/consistency-queries ql/java/ql/test/query-tests/security/CWE-749/
```

Otherwise, we get a ClassDefNotFound error... But really this should be fixed during the bazelification of the kotlin extractor.
  • Loading branch information
d10c committed Apr 30, 2024
1 parent 06c9eb5 commit 96007f2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions java/kotlin-extractor/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ def compile_to_jar(build_dir, tmp_src_dir, srcs, version, classpath, java_classp

compile_to_dir(build_dir, srcs, version, classpath, java_classpath, class_dir)

cwd = os.getcwd()
try:
os.chdir(class_dir)
run_process(['jar', 'xf', cwd + '/' + kotlin_dependency_folder + '/aircompressor-0.26.jar'])
finally:
os.chdir(cwd)

run_process(['jar', 'cf', output,
'-C', class_dir, '.',
'-C', tmp_src_dir + '/main/resources', 'META-INF',
Expand Down

0 comments on commit 96007f2

Please sign in to comment.