Gradle: Difference between revisions

From HaFrWiki42
Jump to navigation Jump to search
Created page with "{{TOCright}} == Introduction == The default build tool for Android (and the new star of build tools on the JVM) is designed to ease scripting of complex, multi-language build..."
 
mNo edit summary
Line 3: Line 3:
== Introduction ==
== Introduction ==
The default build tool for Android (and the new star of build tools on the JVM) is designed to ease scripting of complex, multi-language builds.  
The default build tool for Android (and the new star of build tools on the JVM) is designed to ease scripting of complex, multi-language builds.  
Should you change to it, though, if you're using Ant or Maven? <ref>[http://www.drdobbs.com/jvm/why-build-your-java-projects-with-gradle/240168608 DrDobbs], The heart of this article is a good-old Dr.DobbsJ ournal Article. <br>Back to the basics with Dr Dobbs!</ref>
Should you change to it, though, if you're using Ant or Maven? <ref>[http://www.drdobbs.com/jvm/why-build-your-java-projects-with-gradle/240168608 DrDobbs], The heart of this article is a good-old Dr.Dobbs Journal Article. Back to the basics with Dr Dobbs!</ref>


== Build Tools ==
== Build Tools ==
Line 30: Line 30:
== See also ==
== See also ==
<span class="editsection">[[#content|top]]</span>
<span class="editsection">[[#content|top]]</span>
* [http://gradle.org/downloads Gradle.org], Downloads


== Reference ==
== Reference ==

Revision as of 19:16, 2 March 2015

Introduction

The default build tool for Android (and the new star of build tools on the JVM) is designed to ease scripting of complex, multi-language builds. Should you change to it, though, if you're using Ant or Maven? [1]

Build Tools

For years, builds had the simple requirements of compiling and packaging software. But the landscape of modern software development has changed, and so have the needs for build automation.

Today, projects involve large and diverse software stacks, incorporate multiple programming languages, and apply a broad spectrum of testing strategies. With the rise of agile practices, builds must support early integration of code as well as frequent and easy delivery to both test and production environments.

Established build tools regularly fall short in meeting these goals.

  • How many times have your eyes glazed over while looking at XML to figure out how a build works?
  • And why can't it be easier to add custom logic to your build?

All too often, when adding on to a build script, you can't shake the feeling that you're implementing a workaround or hack. I feel your pain.

There has to be a better way of doing these things in an expressive and maintainable way. There is — it's called Gradle.

What is it

Gradle is the next evolutionary step in JVM-based build tools. It draws on lessons learned from established tools such as Ant and Maven and takes their best ideas to the next level.

Following a build-by-convention approach, Gradle allows for declaratively modeling your problem domain using a powerful and expressive domain-specific language (DSL) implemented in Groovy instead of XML.
Because Gradle is a JVM native, it allows you to write custom logic in the language you're most comfortable with, be it Java or Groovy.

See also

top

Reference

top

  1. DrDobbs, The heart of this article is a good-old Dr.Dobbs Journal Article. Back to the basics with Dr Dobbs!