Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deps #1007

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ asm = "9.6"
commons-io = "2.15.0"
gson = "2.10.1"
jackson = "2.16.0"
guava = "32.1.3-jre"
guava = "33.0.0-jre"

stitch = "0.6.2"
tiny-remapper = "0.8.11"
tiny-remapper = "0.9.0"
access-widener = "2.1.0"
mapping-io = "0.5.0"
mapping-io = "0.5.1"
lorenz-tiny = "4.0.2"
mercury = "0.4.1"
kotlinx-metadata = "0.7.0"
kotlinx-metadata = "0.8.0"

# Plugins
spotless = "6.20.0"
Expand Down
2 changes: 1 addition & 1 deletion gradle/test.libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mockito = "5.7.0"
java-debug = "0.49.0"
mixin = "0.11.4+mixin.0.8.5"

gradle-nightly = "8.6-20231118001259+0000"
gradle-nightly = "8.6-20231219002119+0000"
fabric-loader = "0.14.24"
fabric-installer = "0.11.1"

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ class KotlinClassMetadataRemappingAnnotationVisitor(private val remapper: Remapp
logger.info("Kotlin metadata for class ($className) as it was built using a different major Kotlin version (${header.metadataVersion[0]}.${header.metadataVersion[1]}.x) while the remapper is using (${KotlinVersion.CURRENT}).")
}

when (val metadata = KotlinClassMetadata.read(header)) {
when (val metadata = KotlinClassMetadata.readLenient(header)) {
is KotlinClassMetadata.Class -> {
var klass = metadata.kmClass
klass = KotlinClassRemapper(remapper).remap(klass)
val remapped = KotlinClassMetadata.writeClass(klass, header.metadataVersion, header.extraInt)
val remapped = KotlinClassMetadata.Class(klass, metadata.version, metadata.flags).write()
writeClassHeader(remapped)
validateKotlinClassHeader(remapped, header)
}
Expand All @@ -69,7 +69,7 @@ class KotlinClassMetadataRemappingAnnotationVisitor(private val remapper: Remapp

if (klambda != null) {
klambda = KotlinClassRemapper(remapper).remap(klambda)
val remapped = KotlinClassMetadata.writeLambda(klambda, header.metadataVersion, header.extraInt)
val remapped = KotlinClassMetadata.SyntheticClass(klambda, metadata.version, metadata.flags).write()
writeClassHeader(remapped)
validateKotlinClassHeader(remapped, header)
} else {
Expand All @@ -79,15 +79,14 @@ class KotlinClassMetadataRemappingAnnotationVisitor(private val remapper: Remapp
is KotlinClassMetadata.FileFacade -> {
var kpackage = metadata.kmPackage
kpackage = KotlinClassRemapper(remapper).remap(kpackage)
val remapped = KotlinClassMetadata.writeFileFacade(kpackage, header.metadataVersion, header.extraInt)
val remapped = KotlinClassMetadata.FileFacade(kpackage, metadata.version, metadata.flags).write()
writeClassHeader(remapped)
validateKotlinClassHeader(remapped, header)
}
is KotlinClassMetadata.MultiFileClassPart -> {
var kpackage = metadata.kmPackage
kpackage = KotlinClassRemapper(remapper).remap(kpackage)
val wrapper = KotlinClassMetadataWrapper(metadata)
val remapped = KotlinClassMetadata.writeMultiFileClassPart(kpackage, metadata.facadeClassName, wrapper.annotationData.metadataVersion, wrapper.annotationData.extraInt)
val remapped = KotlinClassMetadata.MultiFileClassPart(kpackage, metadata.facadeClassName, metadata.version, metadata.flags).write()
writeClassHeader(remapped)
validateKotlinClassHeader(remapped, header)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package net.fabricmc.loom.test.unit.kotlin

import kotlin.KotlinVersion
import org.objectweb.asm.ClassReader
import org.objectweb.asm.tree.ClassNode
import spock.lang.Specification
Expand All @@ -36,7 +37,7 @@ import net.fabricmc.tinyremapper.api.TrEnvironment
import net.fabricmc.tinyremapper.api.TrRemapper

class KotlinRemapperClassloaderTest extends Specification {
private static String KOTLIN_VERSION = "1.6.10"
private static String KOTLIN_VERSION = KotlinVersion.CURRENT.toString()
private static String KOTLIN_METADATA_VERSION = KotlinPluginUtils.kotlinMetadataVersion
private static String KOTLIN_URL = "https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/${KOTLIN_VERSION}/kotlin-stdlib-${KOTLIN_VERSION}.jar"
private static String KOTLIN_METADATA_URL = "https://repo1.maven.org/maven2/org/jetbrains/kotlinx/kotlinx-metadata-jvm/${KOTLIN_METADATA_VERSION}/kotlinx-metadata-jvm-${KOTLIN_METADATA_VERSION}.jar"
Expand Down