Skip to content

Enable JDK-EA builds again #13036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
28be33f
Fix JabRef-post-image.wsf to make it agnostic to the location of the …
alexeysemenyukoracle Apr 29, 2025
407af96
move to jabgui
Siedlerchr Apr 29, 2025
65eb404
fix errors and convert to build dir from layout
Siedlerchr Apr 29, 2025
aac904f
Use mise and JDK25-ea
koppor Apr 30, 2025
222c9ae
Fix path
koppor Apr 30, 2025
1a25775
Check if mise sets env vars
koppor Apr 30, 2025
f2b7e15
Refine Java installation
koppor Apr 30, 2025
37590f8
Fix path on Windows
koppor Apr 30, 2025
33fc6c3
Use jdpackage from JDK25
koppor Apr 30, 2025
bd76b44
Use mise everywhere
koppor Apr 30, 2025
80baef8
Updating the gradle wrapper does not need any JDK
koppor Apr 30, 2025
b943996
Update byte-buddy
koppor Apr 30, 2025
09c04a1
More byte buddy
koppor Apr 30, 2025
8f804ea
Try to set JAVA_HOME
koppor Apr 30, 2025
9289d93
Remove main.wxs
koppor Apr 30, 2025
dc293db
Try quick hack for .kts
koppor Apr 30, 2025
f5859d7
Enable debugging OpenRewrite
koppor Apr 30, 2025
35a5a58
Fix PATH and JAVA_HOME
koppor Apr 30, 2025
3bf0aae
Merge remote-tracking branch 'origin/main' into fix-jpackage-post-ima…
koppor Apr 30, 2025
e9e7fbb
Fix brace
koppor Apr 30, 2025
5d0a2b5
Fix typo
koppor Apr 30, 2025
2f4866a
Fix path
koppor Apr 30, 2025
bf4328e
Add some debug
koppor Apr 30, 2025
71f7f3a
More debug - and try to fix
koppor Apr 30, 2025
462b953
Merge remote-tracking branch 'origin/main' into fix-jpackage-post-ima…
koppor May 4, 2025
4b19e64
Discard changes to .github/workflows/tests.yml
koppor May 4, 2025
d371a46
Discard changes to .github/workflows/tests-fetchers.yml
koppor May 4, 2025
793ed12
Initial -jdk-ea version
koppor May 4, 2025
3173d43
Discard changes to .github/workflows/deployment.yml
koppor May 4, 2025
ae52cce
Discard changes to mise.toml
koppor May 4, 2025
c2f4f5f
Merge branch 'fix-jpackage-post-image-update-to-JDK25' of github.com:…
koppor May 4, 2025
a9b85bb
Downgrad regular toolchain
koppor May 4, 2025
cefcece
Try to update to JDK-ea using mise
koppor May 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
391 changes: 391 additions & 0 deletions .github/workflows/deployment-ea.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ testing {
}

java {
sourceCompatibility = JavaVersion.VERSION_24
targetCompatibility = JavaVersion.VERSION_24
toolchain {
// If this is updated, also update
// - build.gradle -> jacoco -> toolVersion (because JaCoCo does not support newest JDK out of the box. Check versions at https://www.jacoco.org/jacoco/trunk/doc/changes.html)
Expand All @@ -49,6 +51,6 @@ java {
// See https://docs.gradle.org/current/javadoc/org/gradle/jvm/toolchain/JvmVendorSpec.html for a full list
// See https://docs.gradle.org/current/javadoc/org/gradle/jvm/toolchain/JvmVendorSpec.html for a full list
// Temurin does not ship jmods, thus we need to use another JDK -- see https://github.com/actions/setup-java/issues/804
vendor = JvmVendorSpec.AZUL
// vendor = JvmVendorSpec.AZUL
}
}
45 changes: 38 additions & 7 deletions jabgui/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.apache.tools.ant.filters.ReplaceTokens
import org.gradle.internal.os.OperatingSystem
import org.javamodularity.moduleplugin.extensions.CompileModuleOptions
import org.javamodularity.moduleplugin.extensions.RunModuleOptions
Expand Down Expand Up @@ -121,7 +122,10 @@ dependencies {
testImplementation("org.testfx:testfx-core:4.0.16-alpha")
testImplementation("org.testfx:testfx-junit5:4.0.16-alpha")

testImplementation("org.mockito:mockito-core:5.17.0")
testImplementation("org.mockito:mockito-core:5.17.0") {
exclude(group = "net.bytebuddy", module = "byte-buddy")
}
testImplementation("net.bytebuddy:byte-buddy:1.17.5")

// recommended by https://github.com/wiremock/wiremock/issues/2149#issuecomment-1835775954
testImplementation("org.wiremock:wiremock-standalone:3.12.1")
Expand Down Expand Up @@ -258,7 +262,34 @@ tasks.named("jlinkZip") {
}

tasks.register<Delete>("deleteInstallerTemp") {
delete(file("$buildDir/installer"))
delete(layout.buildDirectory.dir("installer"))
}

var jpackageResourceDir: String = ""

if (OperatingSystem.current().isWindows) {
jpackageResourceDir = "${layout.buildDirectory.get().asFile}/jpackage-resource-dir"

tasks.register<Copy>("copyJPackageResourceDir") {
from("${projectDir}/buildres/windows") {
include("JabRef-post-image.wsf")
filter(ReplaceTokens::class, mapOf("tokens" to mapOf(
"jabRefRoot" to project.projectDir.toString().replace('\\', '/')
)))
}
from("${projectDir}/buildres/windows") {
exclude("JabRef-post-image.wsf")
}
into(jpackageResourceDir)
}

tasks.named("jpackage").configure {
dependsOn("copyJPackageResourceDir")
}
} else if (OperatingSystem.current().isLinux) {
jpackageResourceDir = "${projectDir}/buildres/linux"
} else if (OperatingSystem.current().isMacOsX) {
jpackageResourceDir = "${projectDir}/buildres/mac"
}

jlink {
Expand Down Expand Up @@ -413,7 +444,7 @@ jlink {
)
requires(
"org.tukaani.xz"
);
)
uses(
"ai.djl.engine.EngineProvider"
)
Expand Down Expand Up @@ -496,8 +527,8 @@ jlink {
"--win-shortcut",
"--win-menu",
"--win-menu-group", "JabRef",
"--temp", "$buildDir/installer",
"--resource-dir", "$projectDir/buildres/windows",
"--temp", "${layout.buildDirectory.get()}/installer",
"--resource-dir", jpackageResourceDir,
"--license-file", "$projectDir/buildres/LICENSE_with_Privacy.md",
"--file-associations", "$projectDir/buildres/windows/bibtexAssociations.properties"
)
Expand All @@ -516,7 +547,7 @@ jlink {
"--vendor", "JabRef",
"--app-version", "$version",
// "--temp", "$buildDir/installer",
"--resource-dir", "$projectDir/buildres/linux",
"--resource-dir", jpackageResourceDir,
"--linux-menu-group", "Office;",
"--linux-rpm-license-type", "MIT",
// "--license-file", "$projectDir/LICENSE.md",
Expand All @@ -543,7 +574,7 @@ jlink {
"--mac-package-name", "JabRef",
"--app-version", "$version",
"--file-associations", "$projectDir/buildres/mac/bibtexAssociations.properties",
"--resource-dir", "$projectDir/buildres/mac"
"--resource-dir", jpackageResourceDir
)
)
}
Expand Down
40 changes: 40 additions & 0 deletions jabgui/buildres/windows/JabRef-post-image.wsf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" ?>
<package>
<job id="postImage">
<script language="jscript">
<![CDATA[
var fileSystem = new ActiveXObject("Scripting.FileSystemObject");

// The script is invoked in the "image" folder and not in "config" for some reason
// DEBUG Output
// var shell = new ActiveXObject("WScript.Shell");
// shell.Popup(fileSystem.GetFolder("."));
var jabRefRoot = fileSystem.GetFolder('@jabRefRoot@');
// jpackage will run a copy of the script from the "config" directory.
var installerConfig = fileSystem.GetFile(WScript.ScriptFullName).ParentFolder;

WScript.Echo("jabRefRoot: " + jabRefRoot)
WScript.Echo("installerConfig: " + installerConfig)

// Copy additional installer resources
fileSystem.CopyFile(jabRefRoot + "/buildres/windows/JabRefTopBanner.bmp", installerConfig + "/JabRefTopBanner.bmp");

var wxsFilePath = installerConfig + "/main.wxs";
wxsFile = fileSystem.OpenTextFile(wxsFilePath, 1);
var contents = wxsFile.ReadAll();
wxsFile.Close();

// Add registry values for JabRef Browser Extension
contents = contents.replace("</Product>", "<DirectoryRef Id=\"TARGETDIR\"><Component Id=\"RegistryJabRefBrowserEntries\" Guid=\"b6bc55ad-905c-4258-89b1-8b37abbe559c\" Win64=\"yes\"><RegistryKey Root=\"HKMU\" Key=\"SOFTWARE\\Mozilla\\NativeMessagingHosts\\org.jabref.jabref\" Action=\"createAndRemoveOnUninstall\" ForceCreateOnInstall=\"yes\"><RegistryValue Type=\"string\" Value=\"[INSTALLDIR]jabref-firefox.json\"/></RegistryKey><RegistryKey Root=\"HKMU\" Key=\"Software\\Google\\Chrome\\NativeMessagingHosts\\org.jabref.jabref\" Action=\"createAndRemoveOnUninstall\" ForceCreateOnInstall=\"yes\"><RegistryValue Type=\"string\" Value=\"[INSTALLDIR]jabref-chrome.json\"/></RegistryKey><RegistryKey Root=\"HKMU\" Key=\"Software\\Microsoft\\Edge\\NativeMessagingHosts\\org.jabref.jabref\" Action=\"createAndRemoveOnUninstall\" ForceCreateOnInstall=\"yes\"><RegistryValue Type=\"string\" Value=\"[INSTALLDIR]jabref-chrome.json\"/></RegistryKey><RegistryKey Root=\"HKMU\" Key=\"Software\\Google\\Chrome\\Extensions\\bifehkofibaamoeaopjglfkddgkijdlh\" Action=\"createAndRemoveOnUninstall\" ForceCreateOnInstall=\"yes\"><RegistryValue Type=\"string\" Name=\"update_url\" Value=\"https://clients2.google.com/service/update2/crx\" /></RegistryKey><RegistryKey Root=\"HKMU\" Key=\"Software\\Wow6432Node\\Google\\Chrome\\Extensions\\bifehkofibaamoeaopjglfkddgkijdlh\" Action=\"createAndRemoveOnUninstall\" ForceCreateOnInstall=\"yes\"><RegistryValue Type=\"string\" Name=\"update_url\" Value=\"https://clients2.google.com/service/update2/crx\" /></RegistryKey><RegistryKey Root=\"HKMU\" Key=\"Software\\Microsoft\\Edge\\Extensions\\pgkajmkfgbehiomipedjhoddkejohfna\" Action=\"createAndRemoveOnUninstall\" ForceCreateOnInstall=\"yes\"><RegistryValue Type=\"string\" Name=\"update_url\" Value=\"https://edge.microsoft.com/extensionwebstorebase/v1/crx\" /></RegistryKey><RegistryKey Root=\"HKMU\" Key=\"Software\\Wow6432Node\\Microsoft\\Edge\\Extensions\\pgkajmkfgbehiomipedjhoddkejohfna\" Action=\"createAndRemoveOnUninstall\" ForceCreateOnInstall=\"yes\"><RegistryValue Type=\"string\" Name=\"update_url\" Value=\"https://edge.microsoft.com/extensionwebstorebase/v1/crx\" /></RegistryKey></Component></DirectoryRef><Feature Id=\"BrowserExtension\" Level=\"1\"><ComponentRef Id=\"RegistryJabRefBrowserEntries\" /></Feature></Product>");

// Specify banner
contents = contents.replace("</Product>", "<WixVariable Id=\"WixUIBannerBmp\" Value=\"JabRefTopBanner.bmp\" /></Product>");
//contents = contents.replace("</Product>", "<WixVariable Id=\"WixUIDialogBmp\" Value=\"\" /></Product>");

wxsFile = fileSystem.OpenTextFile(wxsFilePath, 2, true);
wxsFile.Write(contents);
wxsFile.Close();
]]>
</script>
</job>
</package>
165 changes: 0 additions & 165 deletions jabgui/buildres/windows/main.wxs

This file was deleted.

5 changes: 4 additions & 1 deletion jabkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ dependencies {
implementation("org.apache.lucene:lucene-queryparser:${luceneVersion}")

testImplementation(project(":test-support"))
testImplementation("org.mockito:mockito-core:5.17.0")
testImplementation("org.mockito:mockito-core:5.17.0") {
exclude(group = "net.bytebuddy", module = "byte-buddy")
}
testImplementation("net.bytebuddy:byte-buddy:1.17.5")
}

/*
Expand Down
5 changes: 4 additions & 1 deletion jablib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-params:5.12.2")
testImplementation("org.junit.platform:junit-platform-launcher:1.12.2")

testImplementation("org.mockito:mockito-core:5.17.0")
testImplementation("org.mockito:mockito-core:5.17.0") {
exclude(group = "net.bytebuddy", module = "byte-buddy")
}
testImplementation("net.bytebuddy:byte-buddy:1.17.5")

testImplementation("org.xmlunit:xmlunit-core:2.10.0")
testImplementation("org.xmlunit:xmlunit-matchers:2.10.0")
Expand Down
5 changes: 4 additions & 1 deletion jabsrv/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ dependencies {
exclude(group = "org.antlr")
}

testImplementation("org.mockito:mockito-core:5.17.0")
testImplementation("org.mockito:mockito-core:5.17.0") {
exclude(group = "net.bytebuddy", module = "byte-buddy")
}
testImplementation("net.bytebuddy:byte-buddy:1.17.5")
}

javafx {
Expand Down
6 changes: 5 additions & 1 deletion test-support/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ dependencies {
implementation("org.apache.logging.log4j:log4j-to-slf4j:2.24.3")

implementation("org.junit.jupiter:junit-jupiter-api:5.12.2")
implementation("org.mockito:mockito-core:5.17.0")

implementation("org.mockito:mockito-core:5.17.0") {
exclude(group = "net.bytebuddy", module = "byte-buddy")
}
implementation("net.bytebuddy:byte-buddy:1.17.5")

implementation("org.jspecify:jspecify:1.0.0")
}
Expand Down