axion-release-plugin icon indicating copy to clipboard operation
axion-release-plugin copied to clipboard

Rewriting domain to Java

Open adamdubiel opened this issue 5 years ago • 3 comments

axion-release was first written back in the days, when Gradle recommended writing plugins in Groovy and a lot of build ran on Java 1.6 or 1.7. This is no longer the case. Gradle recommends writing plugins in Java and Gradle does not support Java 1.7 for some time now. Bits of code in axion-release actually rely on Java 1.8.

After merging #310 , i would like to merge PR which moves most of the production domain code to Java. Tests are still in Groovy and will stay so (Spock is really great). No refactoring was done except moving Groovy to Java, mostly using IntelliJ auto-refactor tools. No breaking changes for clients are introduced, so no builds will break.

Branch with Java refactoring is available here: https://github.com/allegro/axion-release-plugin/compare/first-move-to-java?expand=1

adamdubiel avatar Jan 04 '20 20:01 adamdubiel

Next steps include using new plugin APIs in Gradle like lazy configuration API.

This might force release of axion-release 2.0.0 version, if any breaking changes will be introduced.

adamdubiel avatar Jan 04 '20 20:01 adamdubiel

You eventually might to look into Kotlin, which is code-wise more nearby to Groovy than Java is. I've written a couple of Gradle plugins with Kotlin already and it works quite well.

realdadfish avatar May 15 '20 08:05 realdadfish

+1 to @realdadfish's comment. Kotlin is the preferred language with Gradle now. Speaking of which, are there any examples of configuring the plugin using Kotlin DSL?

asarkar avatar Oct 22 '20 01:10 asarkar