mirror of https://github.com/kivy/pyjnius.git
switch to source level 1.7 for all environments
This commit is contained in:
parent
806e444371
commit
104ef47d0b
|
@ -1,6 +1,6 @@
|
||||||
<project>
|
<project>
|
||||||
<property name="ant.build.javac.source" value="1.6" />
|
<property name="ant.build.javac.source" value="1.7" />
|
||||||
<property name="ant.build.javac.target" value="1.6" />
|
<property name="ant.build.javac.target" value="1.7" />
|
||||||
|
|
||||||
<target name="clean">
|
<target name="clean">
|
||||||
<delete dir="build/classes"/>
|
<delete dir="build/classes"/>
|
||||||
|
|
18
setup.py
18
setup.py
|
@ -96,20 +96,12 @@ def find_javac(possible_homes):
|
||||||
def compile_native_invocation_handler(*possible_homes):
|
def compile_native_invocation_handler(*possible_homes):
|
||||||
'''Find javac and compile NativeInvocationHandler.java.'''
|
'''Find javac and compile NativeInvocationHandler.java.'''
|
||||||
javac = find_javac(possible_homes)
|
javac = find_javac(possible_homes)
|
||||||
source_level = '1.6'
|
source_level = '1.7'
|
||||||
# We have to check what version of javac this is, because -target 1.6 is
|
|
||||||
# no longer supported on JDKs >= 12.
|
|
||||||
javac_version = subprocess.check_output([javac, '-version'],
|
|
||||||
stderr=subprocess.STDOUT)
|
|
||||||
for m in re.finditer(r'\d+', javac_version.decode('ascii')):
|
|
||||||
if int(m.group(0)) >= 12:
|
|
||||||
source_level = '1.7'
|
|
||||||
break
|
|
||||||
try:
|
try:
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
javac, '-target', source_level, '-source', source_level,
|
javac, '-target', source_level, '-source', source_level,
|
||||||
join('jnius', 'src', 'org', 'jnius', 'NativeInvocationHandler.java')
|
join('jnius', 'src', 'org', 'jnius', 'NativeInvocationHandler.java')
|
||||||
])
|
])
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
javac.replace('"', ''), '-target', source_level, '-source', source_level,
|
javac.replace('"', ''), '-target', source_level, '-source', source_level,
|
||||||
|
|
Loading…
Reference in New Issue