Skip to content

Commit

Permalink
Support Java 19+
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Jun 10, 2024
1 parent a7afe0f commit 3609ebf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
5 changes: 2 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* allowing one to test against multiple Jenkins versions.
*/
buildPlugin(useContainerAgent: true, configurations: [
[ platform: 'linux', jdk: '11' ],
[ platform: 'windows', jdk: '11' ],
[ platform: 'linux', jdk: '17' ],
[platform: 'linux', jdk: 21],
[platform: 'windows', jdk: 17],
])
15 changes: 10 additions & 5 deletions injector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@
<!-- basic sanity. unmodified client and v1 should work as expected -->
<javac destdir="target/test-classes/v1" includeantruntime="false" release="${maven.compiler.release}" srcdir="src/test/v1" />
<javac classpath="target/test-classes/v1" destdir="target/test-classes/client" includeantruntime="false" release="${maven.compiler.release}" srcdir="src/test/client" />
<java classname="Main" failonerror="true">
<java classname="Main" failonerror="true" fork="true">
<sysproperty key="java.security.manager" value="allow" />
<arg value="foo" />
<classpath>
<pathelement path="target/test-classes/v1" />
Expand All @@ -115,13 +116,15 @@
</javac>

<!-- post process v2 -->
<java classname="com.infradna.tool.bridge_method_injector.MethodInjector" failonerror="true">
<java classname="com.infradna.tool.bridge_method_injector.MethodInjector" failonerror="true" fork="true">
<sysproperty key="java.security.manager" value="allow" />
<arg value="${project.basedir}/target/test-classes/v2" />
<classpath refid="maven.compile.classpath" />
</java>

<!-- verify that unmodified client code continue to work with v2 binary -->
<java classname="Main" failonerror="true">
<java classname="Main" failonerror="true" fork="true">
<sysproperty key="java.security.manager" value="allow" />
<arg value="bar" />
<classpath>
<pathelement path="target/test-classes/v2" />
Expand All @@ -139,7 +142,8 @@
</javac>

<!-- post process synthetics -->
<java classname="com.infradna.tool.bridge_method_injector.MethodInjector" failonerror="true">
<java classname="com.infradna.tool.bridge_method_injector.MethodInjector" failonerror="true" fork="true">
<sysproperty key="java.security.manager" value="allow" />
<arg value="${project.basedir}/target/test-classes/synthetics" />
<classpath refid="maven.compile.classpath" />
</java>
Expand All @@ -152,7 +156,8 @@
<pathelement path="target/test-classes/v2" />
</classpath>
</javac>
<java classname="Main" failonerror="true">
<java classname="Main" failonerror="true" fork="true">
<sysproperty key="java.security.manager" value="allow" />
<arg value="bar" />
<classpath>
<pathelement path="target/test-classes/v2" />
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci</groupId>
<artifactId>jenkins</artifactId>
<version>1.115</version>
<version>1.116</version>
<relativePath />
</parent>

Expand Down

0 comments on commit 3609ebf

Please sign in to comment.