aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/java.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-01-19 12:42:25 -0800
committerEli Schwartz <eschwartz93@gmail.com>2022-01-28 15:53:20 -0500
commit11f96380351a88059ec55f1070fdebc1b1033117 (patch)
tree3577f52920c3e2159f193605a894cb090b95ec10 /mesonbuild/modules/java.py
parentb402817fb6f0392812bfa272bdbc05c9c30139fa (diff)
downloadmeson-11f96380351a88059ec55f1070fdebc1b1033117.zip
meson-11f96380351a88059ec55f1070fdebc1b1033117.tar.gz
meson-11f96380351a88059ec55f1070fdebc1b1033117.tar.bz2
build: replace kwargs in CustomTarget initializer
Because we don't want to pass the Interpreter kwargs into the build layer. This turned out to be a mega commit, as there's really on elegant way to make this change in an incremental way. On the nice side, mypy made this change super easy, as nearly all of the calls to `CustomTarget` are fully type checked! It also turns out that we're not handling install_tags in custom_target correctly, since we're not converting the boolean values into Optional values!
Diffstat (limited to 'mesonbuild/modules/java.py')
-rw-r--r--mesonbuild/modules/java.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/mesonbuild/modules/java.py b/mesonbuild/modules/java.py
index 0af5aec..20cf3fd 100644
--- a/mesonbuild/modules/java.py
+++ b/mesonbuild/modules/java.py
@@ -51,20 +51,22 @@ class JavaModule(ExtensionModule):
else:
header = f'{pathlib.Path(file.fname).stem}.h'
- ct_kwargs = {
- 'input': file,
- 'output': header,
- 'command': [
+ target = CustomTarget(
+ os.path.basename(header),
+ state.subdir,
+ state.subproject,
+ [
self.javac.exelist[0],
'-d',
'@PRIVATE_DIR@',
'-h',
state.subdir,
'@INPUT@',
- ]
- }
-
- target = CustomTarget(os.path.basename(header), state.subdir, state.subproject, backend=state.backend, kwargs=ct_kwargs)
+ ],
+ [file],
+ [header],
+ backend=state.backend,
+ )
# It is only known that 1.8.0 won't pre-create the directory. 11 and 16
# do not exhibit this behavior.
if version_compare(self.javac.version, '1.8.0'):