interpreter: use typed_kwargs for jar(java_resources)

With the added bonus of adding the correct `since` checking values!
pull/12020/head
Dylan Baker 1 year ago committed by Xavier Claessens
parent 01b5581a10
commit 096869ad63
  1. 1
      mesonbuild/interpreter/kwargs.py
  2. 3
      mesonbuild/interpreter/type_checking.py

@ -354,3 +354,4 @@ class BuildTarget(Library):
class Jar(_BaseBuildTarget):
main_class: str
java_resources: T.Optional[build.StructuredSources]

@ -10,7 +10,7 @@ import typing as T
from .. import compilers
from ..build import (CustomTarget, BuildTarget,
CustomTargetIndex, ExtractedObjects, GeneratedList, IncludeDirs,
BothLibraries, SharedLibrary, StaticLibrary, Jar, Executable)
BothLibraries, SharedLibrary, StaticLibrary, Jar, Executable, StructuredSources)
from ..coredata import UserFeatureOption
from ..dependencies import Dependency, InternalDependency
from ..interpreterbase.decorators import KwargInfo, ContainerTypeInfo
@ -534,6 +534,7 @@ SHARED_MOD_KWS = [
# them into build_target easier
_EXCLUSIVE_JAR_KWS: T.List[KwargInfo] = [
KwargInfo('main_class', str, default=''),
KwargInfo('java_resources', (StructuredSources, NoneType), since='0.62.0'),
]
# The total list of arguments used by JAR

Loading…
Cancel
Save