Java

Introducing ebuilds That Build Kotlin Core Libraries from Source

Updated: 16 minutes to read

An initial and successful attempt to create source-based Kotlin packages on Gentoo

Since the last blog post regarding my GSoC project was posted, I moved on to the next part of the project: improvements on the Kotlin ebuilds in the Spark overlay created during last year’s GSoC, namely dev-java/kotlin-common-bin and dev-lang/kotlin-bin. As shown by the -bin suffix in the packages’ names, these are packages that simply install the Kotlin library and compiler binary JARs pre-built by the upstream instead of build those artifacts from source like how the vast majority of Gentoo packages do and how Gentoo’s guidelines propose. At first, I thought it would be hard to build Kotlin from source on Gentoo with Portage, so I did not make any plan to create separate versions of those packages without the -bin suffix. Coincidentally, I discovered a possible way to work around Portage’s limitations that would prevent Kotlin from being built from source, so I immediately started to conduct experiments on building Kotlin libraries from source within Portage. The experiment results were promising, therefore I decided to spend some time working on this and eventually created ebuilds that can build Kotlin core libraries from source with a success. In this post, I will cover possible challenges in building a project like the Kotlin programming language on Gentoo, how my method of building it on Gentoo was accidentally discovered, and how the final ebuilds were produced. …

Properly Handling Process Output When Using Java’s ProcessBuilder

16 minutes to read

Another mysterious disappearance of me from my personal website has happened after the previous one in last November. The reason is the same: I had been quite busy. But unlike last time, I do not think that the things which kept me busy in the past month were futile. I spent significant amount of time helping students in a software engineering course for which I was a teaching assistant, and assisting others is always a meaningful activity in my opinion, regardless of the type of assistance being offered, the context, the recipient of the assistance, or the form. …

MC Forge Mod Dev Blog: Adding a Configuration GUI - 1.16 Version

14 minutes to read

The very first blog post for this series covered how I created a configuration GUI screen for a Minecraft Forge mod targeting Minecraft 1.14.4 and above, despite the fact that the related framework and library classes have been removed from Forge, and the core developers have decided that it should never be added back. I am extremely disappointed to see LexManos, the leader of Forge, harshly rejecting more than one year of hard work of @Cadiboo, the developer who started that linked pull request, with a willy-nilly closure of the pull request. This not only means another dissatisfaction of mine with the Minecraft Forge project but also my obligation to maintain an up-to-date method for creating a mod configuration screen. From my private communication with @yuesha-yc, a Minecraft mod developer who followed me on GitHub after reading my blogs and a current student of the high school I graduated from, I learned that my blog posts about a platform with extremely incomplete documentation can be very useful to developers of that platform. Thus, I will endeavor to share my knowledge about Minecraft Forge mod as before to the greatest possible extent. …

MC Forge Mod Dev Blog: Migrating to Minecraft 1.16

Updated: 13 minutes to read

It is no longer news that Minecraft Forge has stable Minecraft 1.16 support, as the first recommended build for 1.16.x, which is Forge 34.1.0, was released in September 2020, very soon after I published the previous blog post for this serires about an update to my mod project. Development of Forge for Minecraft 1.16.x already had significant progress when the update for my mod was worked on, and I contemplated adding support for 1.16 along with that update. However, after a hard attempt to port my mod to Minecraft 1.16, I decided that because many method names in the Minecraft API source code decompiled by MCP were still not fully deobfuscated, Forge on 1.16 was still immature, and my mod’s update would not ship with 1.16 support. …

MC Forge Mod Dev Blog: Adding a Configuration GUI

Updated: 19 minutes to read

Minecraft Forge had been shipping a configuration GUI framework which mods could use to provide customization options, but the framework has been gone since Minecraft 1.13. This post describes how I created a mod configuration GUI without using that framework by directly using APIs of Minecraft. The procedure shown in this post is applicable to Minecraft 1.14.4 and 1.15.x. I did not check its correctness on Minecraft 1.13.x and old 1.14.x releases since those Minecraft versions do not have stable Minecraft Forge builds, but chances are the majority of the steps are also applicable to those versions. Nevertheless, I would recommend developing mods using only stable Minecraft Forge releases. …