Migrate Designer modules and preview fixtures to Java 25
This commit is contained in:
@@ -26,7 +26,7 @@ run([wrapper, "-B", "-ntp", "clean", "install"])
|
||||
run([wrapper, "-B", "-ntp", "-pl", "designer-target-tools", "org.apache.maven.plugins:maven-dependency-plugin:3.6.1:build-classpath", "-DincludeScope=runtime", "-Dmdep.outputFile=target/runtime-classpath.txt"])
|
||||
for module in ("contracts", "model-processor", "preview-api", "core", "kit-ui", "standalone", "target-tools", "maven-plugin"):
|
||||
name = "designer-" + module
|
||||
expected = 69 if module in ("kit-ui", "standalone") else 65
|
||||
expected = 69
|
||||
with zipfile.ZipFile(ROOT / name / "target" / (name + "-0.1.0-SNAPSHOT.jar")) as jar:
|
||||
classes = [n for n in jar.namelist() if n.endswith(".class")]
|
||||
assert classes, name
|
||||
@@ -34,8 +34,8 @@ for module in ("contracts", "model-processor", "preview-api", "core", "kit-ui",
|
||||
classpath = str(ROOT / "designer-target-tools/target/classes") + os.pathsep + (ROOT / "designer-target-tools/target/runtime-classpath.txt").read_text().strip()
|
||||
target_java = Path(args.target_java_home) / "bin/java"
|
||||
version = subprocess.run([str(target_java), "-version"], capture_output=True, text=True, check=True)
|
||||
if not re.search(r'version "21[.\"]', version.stderr):
|
||||
sys.exit("Target linkage gate requires Java 21")
|
||||
if not re.search(r'version "25[.\"]', version.stderr):
|
||||
sys.exit("Target linkage gate requires Java 25")
|
||||
run([target_java, "-cp", classpath, "de.neitzel.fxdesigner.target.TargetToolInfo"])
|
||||
run([sys.executable, ROOT / "scripts/check-preview-fixtures.py", "--target-java-home", args.target_java_home])
|
||||
run([wrapper, "-B", "-ntp", "-pl", "designer-standalone", "org.apache.maven.plugins:maven-dependency-plugin:3.6.1:build-classpath", "-DincludeScope=test", "-Dmdep.outputFile=target/smoke-classpath.txt"])
|
||||
|
||||
@@ -47,7 +47,7 @@ with tempfile.TemporaryDirectory(prefix="designer-connected-") as temporary:
|
||||
"de.neitzel.fxdesigner.standalone.WorkerLifecycleSmoke", ROOT, fixture])
|
||||
crashes.check()
|
||||
local = fixture / ".neitzel-fx-designer"
|
||||
(local / "runtimes.json").write_text(json.dumps({"schemaVersion":"1.0","runtimes":{"java21":{"build":args.target_java_home,"target":args.target_java_home}}}))
|
||||
(local / "runtimes.json").write_text(json.dumps({"schemaVersion":"1.0","runtimes":{"java25":{"build":args.target_java_home,"target":args.target_java_home}}}))
|
||||
tools = [ROOT / ("designer-" + name) / "target" / ("designer-" + name + "-0.1.0-SNAPSHOT.jar") for name in ("target-tools","contracts","preview-api")]
|
||||
(local / "host.properties").write_text("configuration=../neitzel-fx-designer.json\ncontext=fixture\nsettings=runtimes.json\nmaven="+str(ROOT/"mvnw")+"\ntools="+os.pathsep.join(map(str,tools))+"\n")
|
||||
run("native-kit-" + mode, [Path(os.environ["JAVA_HOME"]) / "bin/java", "--enable-native-access=ALL-UNNAMED", "-cp", classpath,
|
||||
|
||||
@@ -30,7 +30,7 @@ shutil.copytree(args.app, app, symlinks=True)
|
||||
local = library / ".neitzel-fx-designer"
|
||||
local.mkdir()
|
||||
settings = local / "runtimes.json"
|
||||
settings.write_text(json.dumps({"schemaVersion": "1.0", "runtimes": {"java21": {
|
||||
settings.write_text(json.dumps({"schemaVersion": "1.0", "runtimes": {"java25": {
|
||||
"build": str(args.target_java_home.resolve()),
|
||||
"target": str(args.target_java_home.resolve())}}}))
|
||||
classes = output / "agent-classes"
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--repository", type=Path, default=Path.home() / ".m2/repository")
|
||||
parser.add_argument("--repository", type=Path, default=Path(os.environ.get("NEITZELLIB_MAVEN_REPOSITORY", Path.home() / ".m2/repository")))
|
||||
args = parser.parse_args()
|
||||
manifest = json.loads((ROOT / "docs/runtime/neitzellib-baseline.json").read_text())
|
||||
errors = []
|
||||
|
||||
@@ -52,7 +52,7 @@ for mode in (('classpath','modulepath','invalid-configuration','missing-runtime'
|
||||
document=fixture/'app/src/main/resources/fixture/components/Person.fxml'
|
||||
if mode=='missing-runtime':
|
||||
settings=fixture/'.neitzel-fx-designer/runtimes.json'
|
||||
values=json.loads(settings.read_text());values['runtimes']['java21']['build']='/missing/build-jdk'
|
||||
values=json.loads(settings.read_text());values['runtimes']['java25']['build']='/missing/build-jdk'
|
||||
settings.write_text(json.dumps(values))
|
||||
# Only target runtime settings and Maven come from the project; worker tools come from the app.
|
||||
config=fixture/'neitzel-fx-designer.json'
|
||||
|
||||
@@ -32,7 +32,7 @@ if settings.exists() or launch.exists():
|
||||
local.mkdir(exist_ok=True)
|
||||
with settings.open("x") as file:
|
||||
json.dump({"schemaVersion": "1.0", "runtimes": {
|
||||
"java21": {"build": str(java), "target": str(java)}}}, file, indent=2)
|
||||
"java25": {"build": str(java), "target": str(java)}}}, file, indent=2)
|
||||
|
||||
|
||||
def prop(value):
|
||||
|
||||
@@ -15,7 +15,7 @@ shutil.copytree(ROOT / "integration-fixtures/preview" / args.mode, destination,
|
||||
ignore=shutil.ignore_patterns("target"))
|
||||
local = destination / ".neitzel-fx-designer"
|
||||
local.mkdir()
|
||||
(local / "runtimes.json").write_text(json.dumps({"schemaVersion":"1.0","runtimes":{"java21":{"build":str(args.target_java_home.resolve()),"target":str(args.target_java_home.resolve())}}}))
|
||||
(local / "runtimes.json").write_text(json.dumps({"schemaVersion":"1.0","runtimes":{"java25":{"build":str(args.target_java_home.resolve()),"target":str(args.target_java_home.resolve())}}}))
|
||||
tools = [ROOT / ("designer-" + name) / "target" / ("designer-" + name + "-0.1.0-SNAPSHOT.jar")
|
||||
for name in ("target-tools","contracts","preview-api")]
|
||||
# Properties separators in values do not need escaping; double backslashes do.
|
||||
|
||||
Reference in New Issue
Block a user