Cloth Config API (Fabric/Forge/NeoForge)

Cloth Config API (Fabric/Forge/NeoForge)

169M Downloads

Don't use cloth-config as the package name

AfterRebelion opened this issue ยท 1 comments

commented

As of 4.9, many packages were renamed and moved around
One of those changes was shadowing some code in me.shedaniel.cloth.cloth-config.shadowed
The hyphen '-' character is considered an illegal character for packages, and will break several packages under this domain, like @\Comment
imagen
(Image from Intellij IDEA)

Some IDEs will complain further about this:
imagen
(image from VScode)

Please follow naming conventions, so this doesn't break:
https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html

commented

Good catch! This is an error introduced by this part of the gradle buildscript, which naively assumes that the group and jar name are both package name compliant (this is the forge buildscript but it applies to fabric as well):

relocate "blue.endless.jankson", "${rootProject.maven_group}.${rootProject.archives_base_name}.shadowed.blue.endless.jankson"
relocate "com.moandjiezana.toml", "${rootProject.maven_group}.${rootProject.archives_base_name}.shadowed.com.moandjiezana.toml"
relocate "org.yaml.snakeyaml", "${rootProject.maven_group}.${rootProject.archives_base_name}.shadowed.org.yaml.snakeyaml"

I'll be sure to update and fix this in my fork, however, there are some other issues that come with shadowing these libraries, so we may have to end up separating them into their own projects (which we'll probably just JIJ on fabric) entirely