Switch to JDK11

I'm very keen on being able to use the jdk.jartool module (which is only
available in JDK11 onwards) as it allows us to avoid shelling out to
jarsigner entirely.

11 is the current LTS release and is already widespread in Linux
distributions, so I think it's reasonable to require it.

This commit removes the jsobject module. We might need to re-add it in
the future (if jdk.jsobject is removed from the JDK). However, it was
only necessary in 8 because modern versions of 8 tended to be
distributed without plugin.jar. JDK11 is distributed with the
jdk.jsobject module.

Signed-off-by: Graham <gpe@openrs2.dev>
pull/93/head
Graham 4 years ago
parent a096eaf288
commit 164e02cbce
  1. 2
      README.md
  2. 6
      build.gradle.kts
  3. 20
      jsobject/build.gradle.kts
  4. 12
      jsobject/src/main/java/netscape/javascript/JSObject.java
  5. 3
      settings.gradle.kts

@ -10,7 +10,7 @@ released in late 2009.
## Prerequisites
OpenRS2 requires version 8 or later of the [Java Development Kit][jdk].
OpenRS2 requires version 11 or later of the [Java Development Kit][jdk].
The JDK is required even if a pre-built copy of OpenRS2 is used, as it depends
on JDK-only tools, such as `jarsigner`, at runtime.

@ -41,14 +41,14 @@ allprojects {
configure<JavaPluginExtension> {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "11"
freeCompilerArgs = listOf("-Xjsr305=strict")
}
}

@ -1,20 +0,0 @@
plugins {
`java-library`
`maven-publish`
}
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
pom {
packaging = "jar"
name.set("OpenRS2 JavaScript Object")
description.set(
"""
Stubs for the netscape.javascript package.
""".trimIndent()
)
}
}
}

@ -1,12 +0,0 @@
package netscape.javascript;
import java.applet.Applet;
public abstract class JSObject {
public static JSObject getWindow(Applet applet) {
return null;
}
public abstract Object call(String methodName, Object... args);
public abstract Object eval(String s);
}

@ -11,8 +11,7 @@ include(
"deob",
"deob-annotations",
"deob-ast",
"game",
"jsobject"
"game"
)
if (Files.exists(rootProject.projectDir.toPath().resolve("nonfree/build.gradle.kts"))) {

Loading…
Cancel
Save