jvm-profiling-tools / honest-profiler

A sampling JVM profiler without the safepoint sample bias
https://github.com/RichardWarburton/honest-profiler/wiki
MIT License
1.25k stars 146 forks source link

Switch from Maven to Gradle for building #187

Open PhRX opened 7 years ago

PhRX commented 7 years ago

I propose to switch the build system to gradle, for the following reasons :

  1. gradle build files are way more concise Length current pom.xml : 244 lines Length build.gradle + gradle.settings : 92 lines (and I think this already includes more functionality on the gradle part)

  2. gradle java plugin offers a variety of default tasks, including generating javadoc (but maybe that is in maven by default too ?) :

    • ./gradlew javadoc (generates the javadoc)
    • ./gradlew run (runs the application; the build file includes the logic for the tools issue, so we can get rid of the platform-specific cli scripts entirely; and that logic is just a simple platform-independent inclusion)
  3. there is a gradle javafx plugin which can be used to build distributions really easily, even packaging a JRE with it. The end result is an archive (zip or whatever) containing an executable you can just click and it runs. Distributions can be generated for every platform. It works, I did this in the past on another project.

  4. you don't even need to have gradle installed. The gradle wrapper mechanism (which is the gradlew script in the root dir) wraps the "gradle" command, and downloads and uses the gradle binaries for your platform automatically (version specified in build file)

Of course, learning gradle isn't necessarily easy, but AFAICS the current build file does most or all of what the current pom.xml does and maybe already even more, so I'd say that's a good base.