Developer builds Mill plugin to publish Scala libraries as pure Java JARs
A software developer has created an experimental Mill build tool plugin called scala4java that compiles Scala code and packages it as a pure Java library. The plugin automates key tasks including dependency shading, JAR shrinking via ProGuard, and POM/Ivy metadata adjustments to hide Scala internals from Java consumers. The project was motivated by longstanding friction between Scala and Java interoperability, particularly when calling Scala code from Java projects. Users can configure the plugin with minimal setup, needing only to extend custom module traits instead of Mill's standard ScalaModule and PublishModule. The author released the plugin as a case study in Mill's extensibility, with a working example project published on GitHub.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in