GSON gets relocated unlike most of the other libraries

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Minor
    • Spigot 1.8.3
    • Affects Version/s: None

      (None of the issue types really fit, this is more an improvement than a bug or new feature...)

      Prior to 1.8, the libraries used by Minecraft were located in the net.minecraft.util package, so for example net.minecraft.util.io.netty or net.minecraft.util.com.google.gson. In 1.8 these were removed and merged to their default pacakage instead. Now we have packages like io.netty or a newer Guava version directly.

      The GSON library was also removed from there, but unlike the others it is not included in the default package. CraftBukkit has always included a copy of GSON, in org.bukkit.craftbukkit.libs.com.google.gson. Because it gets relocated in CraftBukkit, Minecraft will also use GSON in the other package instead.

      You should either have all libraries in a different package, or all of them in default package. This inconsistency makes it harder for plugin authors for example to make plugins that will run on different implementations, e.g. Spigot and BungeeCord because the GSON package is in a different package.

      GSON is a very nice library, I don't see any reason why you couldn't add it to Bukkit for example. This would be really nice and useful for a lot of developers.

            Assignee:
            Thinkofname
            Reporter:
            MineDev2014
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: