Closed nristock closed 10 years ago
Uhhh. I was actually thinking of porting VoxelSniper to Gradle.
Wow that was a quick response :P
Well I am at my pc... and I get notifications.
Ewww Gradle, meh its your project
Whats wrong with it? I don't know much of anything about it so tell me why they shouldn't use it.
It feels like an added layer of complexity, and doesn't have any strong usable benefits over maven as well as the fact that its a pain to use with external dependencies witch unless you chain it with maven (or use a maven repository) but then your not gaining anything. Also personally I like the XML layout of maven and ant, it feels like a mess in gradle.
....So what's the point of using Gradle? Am I missing something?
You can basically see Gradle as Maven and Ant on steroids. - Builds use an actual imperative programming language (Groovy) and support declarative builds. That makes it somewhat more intuitive than Ant or Maven (which use declarative/descriptive languages only). In Gradle you write actual build scripts. This is the big difference between other build systems and Gradle. That does also make a lot of things easier. - e.g. Generating your artifact name from a git tree etc. is (although not impossible) a hassle to do in Ant or Maven. Gradle allows you to run your git commands, intercept stdout to get the information you need, manipulate the strings the way your're used to (using string.substring(), string.replace(), etc.) and finally set your artifact name.
All dependency related features are just as simple as they are in Maven (you can actually use Maven repositories) - in fact, I'd say dependency declarations are more structured in Gradle:
Gradle:
dependencies {
compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
testCompile group: 'junit', name: 'junit', version: '4.+'
}
Maven:
<dependencies>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2</version>
<scope>compile</scope>
</dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
...wanna set java source compatibility? Gradle:
apply plugin: 'java'
sourceCompatibility = 1.4
Maven
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.4</source>
</configuration>
</plugin>
Things like this are only possibly using Gradle:
class MarkdownFilter extends FilterReader {
MarkdownFilter(Reader input) {
super(new StringReader(new MarkdownProcessor().markdown(input.text)))
}
}
The overhead introduced by XML is enormous. - Some might like it. I don't.
Another useful feature - at least in my eyes - is the support for incremental builds. That saves some time when doing offline and development builds - it's not like we're talking about hours here, not even minutes. But it already makes a difference if a build takes 30 or 15 seconds when you're on a bug hunting tour :P
@deadlybutter There are more things. I guess your best bet would be to take a look at http://www.gradle.org/ yourself and form your own opinion.
+1 @Monofraps
I'll take a look anyway, but you convinced me this is a much better system.
15 seconds? That's a long build... I'm guessing you're not using the daemon property
Oh and you don't have to install gradle to run gradle if the project is set up correctly.
@MikeMatrix It's a big project ~500 files of code and a lot of content that needs regeneration on almost every build. Simple Java projects like VoxelGuest are probablybuilt in around 2 seconds if you don't have to download any dependencies.
I personally hate Groovy any thing that uses white space is just ugly in my eyes. I see that it has more features but it lacks the MC community support that maven has as well as the fact that I don't see any place where I would ever need the extra features it offers.
Since gradle is gaining popularity I want to support it beside maven. - Gradle will become the new primary build system.