Advanced Question Using gradle for compiling Orbiter projects

SolarLiner

It's necessary, TARS.
Addon Developer
Joined
Jun 14, 2010
Messages
1,847
Reaction score
2
Points
0
Location
404 ROAD NOT FOUND
I've seen Gradle being used in different GitHub projects I've looked into, but never got the real use for it.

What exactly is Gradle?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,627
Reaction score
2,345
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
I've seen Gradle being used in different GitHub projects I've looked into, but never got the real use for it.

What exactly is Gradle?

Essentially, gradle is a build system to describe how the different files in a project should be processed to become a desired set of resulting artefacts.

What makes gradle especial compared to other build systems is that it uses a full, rather modern script language (Groovy) and OOP to simplify configuration. Also, it has a pretty good compromise between configuration and convention. In the simplest case, you need nothing but a coarse description of your project, as long as you follow the folder structure that gradle expects. The more you differ from the convention, the more you need to configure it. And there, the object orientation makes it pretty simple to reuse common elements. Also, it has a very powerful dependency management, which prevents a lot of the trouble of other build systems.

I know it from the java world, I used gradle together with Jenkins to automatize a project workflow and push it as far towards continuous delivery as possible with our customer. A single 200 line gradle file was enough to produce all needed distributions for a new version, with Jenkins handling the distribution of the test dists to the various test systems - something that previously required 16000 lines of Ant instructions and would have been almost impossible with Maven.

https://docs.gradle.org/current/userguide/introduction.html

Especially the capabilities for multi-project builds is nice for Orbiter, since multi-vessel projects are pretty common here.
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,882
Reaction score
2,133
Points
203
Location
between the planets
Ugh... This is a bad time to ask me about gradle. I just had to get it to cooperate with maven without having used either of the two before...
In my opinion, a build-tool that requires you to learn yet one more language to compile your stuff misses the point a bit.

The documentation isn't too bad, but it's structured in a way that makes it really difficult to find specific things you might be looking for.
 
Top