Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GTNewHorizons/GTNHLib
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.6.5
Choose a base ref
...
head repository: GTNewHorizons/GTNHLib
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.6.6
Choose a head ref
  • 1 commit
  • 18 files changed
  • 1 contributor

Commits on Jan 26, 2025

  1. Backport LWJGL3 memory utilities to enable more efficient ByteBuffer …

    …usage (#105)
    eigenraven authored Jan 26, 2025
    Copy the full SHA
    39d1bed View commit details
7 changes: 0 additions & 7 deletions addon.gradle

This file was deleted.

46 changes: 46 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -3,6 +3,30 @@ plugins {
id("com.gtnewhorizons.gtnhconvention")
}

// Add a Java 17 sourceset for including code optimized for newer Java versions
val java17ToolchainSpec: JavaToolchainSpec.() -> Unit = {
vendor = JvmVendorSpec.AZUL
// Use a Java 21 compiler with a target of 17
languageVersion = JavaLanguageVersion.of(21)
}
val main17 by sourceSets.creating {
compileClasspath = files(compileClasspath, configurations.lwjgl3Classpath.get(), sourceSets.main.get().compileClasspath.filter({ f -> !f.toString().contains("jabel-javac") }), sourceSets.main.get().output)
runtimeClasspath = files(runtimeClasspath, configurations.lwjgl3Classpath.get(), sourceSets.main.get().runtimeClasspath, sourceSets.main.get().output)
}
tasks.named<JavaCompile>(main17.compileJavaTaskName).configure {
javaCompiler = javaToolchains.compilerFor(java17ToolchainSpec)
options.release = 17
sourceCompatibility = JavaVersion.VERSION_17.majorVersion
targetCompatibility = JavaVersion.VERSION_17.majorVersion
}
tasks.jar.configure {
dependsOn(main17.compileJavaTaskName)
into("META-INF/versions/17") { from(main17.output) }
}
tasks.sourcesJar.configure {
into("META-INF/versions/17") { from(main17.java.sourceDirectories) }
}

tasks.processResources {
inputs.property("version", project.version.toString())
filesMatching("META-INF/rfb-plugin/*") {
@@ -14,4 +38,26 @@ tasks.processResources {
val shadowSources = configurations.getByName("shadowSources")
tasks.sourcesJar {
from(shadowSources.map { zipTree(it) })
exclude("META-INF/versions/9/module-info.class")
exclude("META-INF/versions/9/module-info.java")
}

tasks.shadowJar {
into("META-INF/versions/17") { from(main17.output) }
exclude("META-INF/versions/9/module-info.class")
}

tasks.test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}

for (jarTask in listOf(tasks.jar, tasks.shadowJar, tasks.sourcesJar)) {
jarTask.configure {
manifest {
attributes("Multi-Release" to true)
}
}
}
21 changes: 11 additions & 10 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -4,25 +4,26 @@ configurations {
}

dependencies {
shadowImplementation("it.unimi.dsi:fastutil:8.5.12") // Apache 2.0
shadowImplementation("org.joml:joml:1.10.5") // MIT
shadowSources("it.unimi.dsi:fastutil:8.5.12:sources")
shadowSources("org.joml:joml:1.10.5:sources")
shadowImplementation("it.unimi.dsi:fastutil:8.5.15") // Apache 2.0
shadowImplementation("org.joml:joml:1.10.8") { transitive = false } // MIT
shadowSources("it.unimi.dsi:fastutil:8.5.15:sources")
shadowSources("org.joml:joml:1.10.8:sources") { transitive = false }

testImplementation(platform("org.junit:junit-bom:5.9.2"))
testImplementation(platform("org.junit:junit-bom:5.11.4"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher") {
because("Only needed to run tests in a version of IntelliJ IDEA that bundles older versions")
}
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")

compileOnly("com.gtnewhorizons.retrofuturabootstrap:RetroFuturaBootstrap:0.4.0") { transitive = false }
compileOnly("com.github.GTNewHorizons:lwjgl3ify:2.1.6") { transitive = false }
compileOnly("com.gtnewhorizons.retrofuturabootstrap:RetroFuturaBootstrap:1.0.7") { transitive = false }

compileOnly('org.jetbrains:annotations:24.0.1')
compileOnly("org.projectlombok:lombok:1.18.22") {transitive = false }
annotationProcessor("org.projectlombok:lombok:1.18.22")
compileOnly('org.jetbrains:annotations:26.0.1')
compileOnly("org.projectlombok:lombok:1.18.36") {transitive = false }
annotationProcessor("org.projectlombok:lombok:1.18.36")

// For CapturingTesselator compat
compileOnly("com.falsepattern:falsetweaks-mc1.7.10:3.3.2:api")
compileOnly("com.falsepattern:falsetweaks-mc1.7.10:3.8.4:api")
}
Loading