Skip to content

Commit

Permalink
build: Move from requiring JVM 21 to JVM 11. Publishing still require…
Browse files Browse the repository at this point in the history
…s JRE 21, but all other build phases can be run from JVM 11.
  • Loading branch information
nhubbard committed May 23, 2024
1 parent 867fab8 commit 9f35404
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
15 changes: 11 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import java.util.*

// Helper function to protect private properties from being published
Expand Down Expand Up @@ -94,8 +95,8 @@ dependencies {
// Don't upgrade the GraalVM dependency versions!
// The newer versions have different coordinates, and a bunch of unusual issues that have no documented fix on
// non-Graal JDKs.
implementation("org.graalvm.sdk:graal-sdk:23.0.3")
implementation("org.graalvm.js:js:23.0.3")
implementation("org.graalvm.sdk:graal-sdk:22.3.5")
implementation("org.graalvm.js:js:22.3.5")

// TOML
implementation("com.moandjiezana.toml:toml4j:0.7.2")
Expand Down Expand Up @@ -149,6 +150,8 @@ tasks.test {
}

tasks.compileJava {
sourceCompatibility = "11"
targetCompatibility = "11"
options.encoding = "UTF-8"
}

Expand All @@ -159,7 +162,7 @@ tasks.check {
tasks.dokkaHtml {
dokkaSourceSets {
configureEach {
jdkVersion.set(17)
jdkVersion.set(11)
reportUndocumented.set(false)
sourceLink {
localDirectory.set(file("./"))
Expand Down Expand Up @@ -189,7 +192,11 @@ tasks.named<Jar>("javadocJar") {
}

kotlin {
jvmToolchain(21)
jvmToolchain(11)

compilerOptions {
jvmTarget = JvmTarget.JVM_11
}

sourceSets.all {
languageSettings {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ public class NetworkBufferInJava {
public static final RequiredItem<Integer> size = new RequiredItem<>(spec, "size", "size of buffer in KB") {};
public static final LazyItem<Integer> maxSize = new LazyItem<>(spec, "maxSize", config -> config.get(size) * 2, "max size of buffer in KB") {};
public static final OptionalItem<String> name = new OptionalItem<>(spec, "name", "buffer", "name of buffer") {};
public static final OptionalItem<NetworkBuffer.Type> type = new OptionalItem<>(spec, "type", NetworkBuffer.Type.OFF_HEAP, """
type of network buffer.
two type:
- on-heap
- off-heap
buffer is off-heap by default.""") {};
public static final OptionalItem<NetworkBuffer.Type> type = new OptionalItem<>(spec, "type", NetworkBuffer.Type.OFF_HEAP, "type of network buffer.\n two type:\n - on-heap\n - off-heap\n buffer is off-heap by default.") {};
public static final OptionalItem<Integer> offset = new OptionalItem<>(spec, "offset", null, "initial offset of buffer", null, true) {};
}

0 comments on commit 9f35404

Please sign in to comment.