update deps, add VF to runtime classpath
All checks were successful
Publish to snapshot maven / build (push) Successful in 32s

This commit is contained in:
moehreag 2024-08-28 11:08:20 +02:00
parent 9c3091efe1
commit 91e3bf2195
3 changed files with 24 additions and 16 deletions

View file

@ -7,7 +7,7 @@ plugins {
}
group = "dev.frogmc"
version = "0.0.1-alpha.19"
version = "0.0.1-alpha.20"
repositories {
maven {
@ -24,14 +24,14 @@ repositories {
}
dependencies {
implementation("dev.frogmc:thyroxine:0.0.1-alpha.12")
implementation("dev.frogmc:thyroxine:0.0.1-alpha.13")
implementation("org.ow2.asm:asm:9.7")
implementation("org.ow2.asm:asm-commons:9.7")
implementation("org.ow2.asm:asm-tree:9.7")
implementation("com.google.code.gson:gson:2.10.1")
implementation("org.vineflower:vineflower:1.10.1")
testImplementation(kotlin("test"))
implementation("com.electronwill.night-config:toml:3.8.0")
implementation("com.electronwill.night-config:toml:3.8.1")
implementation("com.google.jimfs:jimfs:1.3.0")
}

View file

@ -20,4 +20,6 @@ object Constants {
const val ASM_VERSION = Opcodes.ASM9
const val ALTERNATIVE_RUNTIME_JAR_NAME = "runtime.jar"
const val MOJANG_MANIFEST_URL = "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json"
const val TCA_VERSION = "1.2.0"
const val VF_VERSION = "1.10.1"
}

View file

@ -16,6 +16,7 @@ import dev.frogmc.thyroxine.api.data.MappingData
import org.gradle.api.Action
import org.gradle.api.Project
import org.gradle.api.model.ObjectFactory
import org.gradle.api.plugins.JavaPlugin
import java.nio.file.Files
import javax.inject.Inject
import kotlin.io.path.createParentDirectories
@ -66,7 +67,12 @@ abstract class PhytotelmaGradleExtensionImpl @Inject constructor(
project.dependencies.add(
Constants.MINECRAFT_CONFIGURATION,
"net.minecrell:terminalconsoleappender:1.2.0"
"net.minecrell:terminalconsoleappender:" + Constants.TCA_VERSION
)
// Add VineFlower to allow mixin to decompile classes in debug mode
project.dependencies.add(
JavaPlugin.RUNTIME_ONLY_CONFIGURATION_NAME,
"org.vineflower:vineflower:" + Constants.VF_VERSION
)
VersionChecker.getDependencies(project, version) {
project.dependencies.add(Constants.MINECRAFT_CONFIGURATION, it)
@ -83,18 +89,18 @@ abstract class PhytotelmaGradleExtensionImpl @Inject constructor(
}
project.afterEvaluate {
if (mcConf.targetNamespace != Constants.MOJMAP_NAMESPACE) {
Thyroxine.remap(
MappingData("", ""),
remappedJar,
remappedJar.resolveSibling(Constants.ALTERNATIVE_RUNTIME_JAR_NAME),
false,
listOf(RemappingStep { classVisitor, _ ->
RuntimeAccessFixVisitor(classVisitor)
})
)
} else {
Files.deleteIfExists(remappedJar.resolveSibling(Constants.ALTERNATIVE_RUNTIME_JAR_NAME))
}
Thyroxine.remap(
MappingData("", ""),
remappedJar,
remappedJar.resolveSibling(Constants.ALTERNATIVE_RUNTIME_JAR_NAME),
false,
listOf(RemappingStep { classVisitor, _ ->
RuntimeAccessFixVisitor(classVisitor)
})
)
} else {
Files.deleteIfExists(remappedJar.resolveSibling(Constants.ALTERNATIVE_RUNTIME_JAR_NAME))
}
}
}
}