shadowfacts / Forgelin

Fork of Emberwalker's Forgelin with some sprinkles on top.
Other
94 stars 30 forks source link

Add automatic version replacement in Forgelin.kt #20

Closed marvin-roesch closed 7 years ago

marvin-roesch commented 7 years ago

This enables source replacements in Kotlin files, which in turns allows for automatically expanding @VERSION@ in Forgelin.kt. Fixes #19. In the future, mismatches between file names and in-JAR versions will never happen again!

shadowfacts commented 7 years ago

Awesome, thanks! I’ll release a new build tomorrow.

In the future would it be possible to have this fixed directly in ForgeGradle? It’d be nice to have replacements in Kotlin files without needing a whole bunch of extra code in the build.gradle.

shadowfacts commented 7 years ago

Forgelin 1.5.1 has been released.

marvin-roesch commented 7 years ago

Great to hear that :D I'll see if I can work this into FG proper, but since it's written in Java, calling the Kotlin-related methods requires some different approach. It can do it for Scala because the Gradle API includes a way to get the Scala sources, it didn't have this for Kotlin last time I checked, though.

shadowfacts commented 7 years ago

Oh well, that's too bad. This is certainly better than updating the version manually, though.

marvin-roesch commented 7 years ago

Great news, I was actually able to get this into ForgeGradle. See MinecraftForge/ForgeGradle#437. I'll PR the required changes again when it gets merged, if you want me to.

shadowfacts commented 7 years ago

That would be awesome, thanks!