Gradle is a Apache Ant And Apache Maven Conceptual project automation construction tool, supporting dependency management and multiple projects, similar to Maven , but it is simpler and lighter. It uses a method based on Groovy Rather than traditional XML.
Currently, its supported languages are limited to Java, Groovy and Scala, and it plans to support more languages in the future.
usePlugin 'groovy' repositories { flatDir dirs: "lib" } dependencies { groovy ':groovy-all:1.7.0' compile fileTree(dir: 'lib', includes: ['*.jar']) runtime fileTree(dir: 'lib', includes: ['*.jar']) } // usage: gradle -i run task run(dependsOn: classes) << { captureStandardOutput(LogLevel.INFO) ant.java( classname: 'fox.gem. GroovyClass', fork: true, classpath: "${sourceSets.main.runtimeClasspath.asPath}" ) }
The above is the content in the building file build.gradle of Gradle. Is it much simpler than Ant's build.xml? This is the power of "convention". From this, we can understand the first feature of Gradle: "CoC (convention is better than configuration)". As long as you follow the conventions of Gradle, you can minimize the contents of the build file.