Skip to content

Switch from Gradle + Ant to Maven #367

@tonihele

Description

@tonihele

Switch from Gradle + Ant to Maven. Currently the SDK is using Gradle to do some priming magic and Ant to actually build the SDK. Along with some SH scripts to fill in the gaps. This makes the build very complicated. Especially shunning away any newcomer to the project. Really a hassle to setup the SDK. I think we can replace all of this with Maven.

Current issues:

  • Complicated, I mean two different build systems, c'mon
  • Feels like a lot of workarounds are used (probably things supported by Maven project directly and just hacked to Ant)
  • Difficult to open SDK as a NB platform project in Netbeans as it is detected as a Gradle project in modern Netbeans versions
  • No dependency control in our modules, just need to include JARs manually, they never get upgraded etc.

Maven platform project type is officially supported by Netbeans. Ant is also still but not recommended. Gradle unfortunately is not supported, so I would outright forget it. There was some unofficial plugin for creating this support but I have my doubts. And this Mavenizing should be now much easier as we don't build the engine anymore so less stuff needs to be re-invented.

All the current issues listed would ideally be solved by the Maven system but here are some points that require special attention:

  • Downloading JDKs and bundling them (currently handled by a script and Ant)
  • Handling the harness overrides, a.k.a. our icon used in the launcher
  • Coining the versions (look at version.gradle)
  • Dealing with the jME test project template (currently sources downloaded and extracted by the build.gradle)
  • Dealing with the other Ant project templates (currently build.gradle does a lot of tweaks to update these automatically to the version set for the dependencies)
  • I totally recommend not changing the directory structure to Maven default (src/tests/etc) to avoid too big PR, this default structure can be overridden in the configs

I suspect that the versions could be replaced just with a variable in Maven build which would needed to be upgraded manually before creating a new version. And for the others as well I have done some preliminary research and seems everything is doable and even simplifies things compared to the current setup.

For the Ant project templates we have however... Could be little bit tricky. We now have the Gradle template too which is the highly recommended one. So if this proves too difficult to implement.. We could even drop these. Or replace with Maven templates to go alongside the Gradle template. Although the latter would again bring more to support for what I think is very little value...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions