Effective Gradle Implementation

Build, automate, and deploy your application using Gradle
3.2 (12 ratings)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
189 students enrolled
82% off
Take This Course
  • Lectures 74
  • Length 3 hours
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works


Find online courses made by experts from around the world.


Take your courses with you and learn anywhere, anytime.


Learn and practice real-world skills and achieve your goals.

About This Course

Published 11/2014 English

Course Description

This course will show you how to use Gradle effectively and will help you overcome these issues with the build tool called Gradle. The authors, Ryan and Lee, will take the user from a point of having just a basic development background to being able to implement Gradle in a variety of languages, utilizing Gradle in some beneficial ways including continuous integration and artifact management.

You will learn to build and deploy your code effectively. Gradle is quickly becoming the de facto build tool for Java, Groovy, C++, and other platforms, and is rapidly replacing Maven and Ant systems. Learn how to integrate your IDE, leverage Ant or Maven build assets, deploy artifacts, and integrate with continuous integration servers. You can follow along with step-by-step instructions for the most common IDEs, programming languages, and artifact servers to implement.

You will leave the course feeling like you have a good handle on Gradle and confident to begin planning and building your implementation.

About the Author

Lee Fox is a technologist with a strong background in software development. He has served in architecture roles for companies like 3M, AT&T Wi-Fi Services, Borland, and Pervasive. His software development history has always focused on maintaining quality. He is an Agile pragmatist as he strives to help organizations become more effective in their technical and software development implementations while maintaining a high degree of quality. Lee received his Bachelor of Science in Computer Science from Southwest Texas State University. He is also a Certified ScrumMaster and Trained Innovation Games Facilitator. Lee is co-founder of Xan Endeavors.

Ryan is the Chief Systems and Software Architect and Director of Products at ReachForce, and was formerly Lead Architect. He maintains the grails-quartz plugin, GVPS Grails plugin, and Struts 1 plugins, and is co-chair of the Austin Groovy and Grails User Group in Austin, TX. Ryan is currently building a Grails infrastructure for ReachForce as well as teaching Grails to the developer team. Ryan is also the co-founder of Xan Endeavors, LLC, a collaboration of software development, consulting, coaching, and innovation games. In the past, Ryan has architected a Grails solution that allows rapid deployment of Developer Program portals for all kinds of companies, specializing in the mobile industry. He has also built Java- and Linux-based webcasting for events such as SXSW, built telecom software, and SaaS systems for the financial sector.

What are the requirements?

  • Basic Java development knowledge is a prerequisite.
  • This example-driven video tutorial shows you how to effectively implement Gradle in your projects through a variety of plugins and integration techniques.

What am I going to get from this course?

  • Create a build.gradle file and manage build dependencies
  • Integrate Gradle with popular IDEs such as IntelliJ, Eclipse, and Netbeans
  • Build Java, Scala, and Groovy applications with Gradle
  • Implement C/C++ and JavaScript applications with Gradle
  • Utilize Gradle within a Continuous Integration Loop
  • Integrate Gradle with Artifact Management
  • Incorporate external dependencies such as Maven and Ivy repositories

Who is the target audience?

  • If you are a developer, devops engineer, build engineer, or IT administrator and wish to effectively implement Gradle in your projects, this course is for you. The course takes you through the installation process and how to set up your projects followed by dependency management, IDE integration, and plugin implementations. You also learn to deploy and publish your application.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.


Section 1: Getting Started

Even though we need to start somewhere, there are still some things that are required as prerequisites. In this section, we will look at the prerequisites you need to have in place before you install Gradle.


Installing software on various platforms can be annoying. Fortunately, there is a tool called GVM that will make installing Gradle and keeping track of versions much easier. In this section, we will take a look at installing and using GVM.


Sometimes, there is a need to manually install Gradle. In this section, we will show you how to install Gradle on Windows, OS X, and Linux.


Not every installation goes as smoothly as we would like. So, in this section, we will look at some common problems and solutions to help you past issues while installing Gradle.


Gradle has a lot of structure in its default binary installation. Getting to know that structure will help you better create the builds that best fit your environment. In this section, we will look at the binary installation structure for Gradle itself.


The default Gradle project has a good deal of structure. To ensure the structure helps you rather than hinders you, we will look at the default project structure in this section.


With today's technology, portability is a need that is almost always there, but sometimes overlooked. Gradle has a facility called Gradle wrapper to help with portability issues. In this section, we will look at the Gradle wrapper.


In this section we've learnt how to install Gradle and keep up with current versions of Gradle.

Section 2: Gradle Tasks

In this section we'll learn how to create Tasks in Gradle.


The heart and soul of a Gradle configuration is the build.gradle file. In this section, we will have a look at it.


With Gradle so tightly involved with its Groovy-based DSL, it makes sense to spend some time getting to know Groovy. In this section, we will get a quick taste of Groovy.


How to create a task on the fly that isn't predeclared in your build file.


Control flow of the execution of tasks in the case of errors. Also, control flow by making some tasks always run before or after others to avoid build code duplication.


If you are coming from an Ant environment, it'll be nice to know how to leverage your Ant builds to make the transition easier and more cost effective. In this section, we will look at using Ant tasks to do so.


We will see how to control the flow of certain tasks during the execution phase to create different types of artifacts. If certain dynamic tasks are available at runtime, we need to take certain actions.

Section 3: Java, Groovy, and WAR Plugins

In this section we're going to cover how to build and setup a basic and multimodule Java Project.


What kind of tasks do we need to know about to build a Java project? We will go over the tasks of the Java plugin and how to run it.


Learn how to hook into Maven and publish an artifact to your local repository.


Learn how test code is normally organized, what frameworks are supported, and how to write tests.


Walk through an example multimodule project and see how to access tasks from subprojects. Learn proper structure and how to use them to bring in a Maven or Ivy sub project.


Create a ZIP file with your application and related files for distribution.


Build a Groovy project and learn how to use the tasks. Learn how the srcDir property works in relation to Groovy files.


For an average Java developer, the endgame of a build environment is to turn out a WAR file. In this section, we will look at how we can create a WAR file using Gradle.


In this section we covered a bunch of things such as Java and Groovy plugin tasks, hooking into Maven, Testing, and WAR files.

Section 4: IDE Integration

In this section we'll cover IDE integration


IntelliJ IDEA is a very popular and very powerful IDE. In this section, we will look at integrating Gradle with IntelliJ IDEA and build a sample project in the IDE.


Eclipse is a very popular and free IDE that is chock-full of features. In this section, we will look at integrating Eclipse with Gradle and build a project.


NetBeans is a rather powerful IDE with a wide reach. In this section, we will look at the support for Gradle and build a sample project.


In this section we looked at three popular IDEs, IntelliJ Idea, Eclipse, and NetBeans.

Section 5: Dependency Management

In this section we'll be talking about Dependency Management.


Learn what the different dependency types are in Gradle and see examples of each in action.


See how to use a runtime, compile, test, and project dependency for your project.


Configure dependencies for Maven and Ivy repositories. See examples of long and short notation to resolve artifacts.


Publish Maven and Ivy artifacts like a pro on a local Maven repository or remote Ivy repository.


How do you keep test libraries out of your distributable artifacts? Use configurations like scopes and see examples in action.


·In this section we've covered the six types of dependencies, internal and external dependencies, Maven and Ivy repositories, and declaring dependencies.

Section 6: C++ Support

In this section we'll jump into building native binaries with our Gradle Scripts.


What does the CPP plugin support? In this section, we will look at the platform support and the language support offered by the plugin.


How do you install the CPP plugin? Here, we will show what plugins to use and give you an overview of their tasks.


How do you build a library? What tasks help you build a library? This section will show how to build a shared or static library.


This section will show how to build a native executable and show how to use the toolchain variable.


We dive deeper into the CPP plugin tasks to build and install executables.


Here, we show how to configure different compiler and linkers. Use the toolchain variable and binary types to build on multiple platforms.


Advances with external dependencies since 1.11 and what is still lacking.


Use the multimodule project in concert with a native CPP project.


We will go over your options for publishing the native artifacts support and a plugin to help you do so.


Portability and internationalization can be challenging. In this section, we will address that through the use of variants like platforms and flavors.

Section 7: Building JavaScript (gradle-js-plugin)

In this section we'll talk about the Gradle JavaScript plugin


A build system that can entertain JavaScript files is a very awesome thing. In this section, we will look at enabling the GradleJS plugin and specifying our JavaScript files for a build.


Lots of web applications seem to have numerous JavaScript files that keep code scattered and unorganized. In this section, we will see how the Gradle JavaScript plugin helps to manage the chaos by combining the sources.


Discovering problems early can really help improve a project's development. In this section, we will look at how static code analysis using JSHint can accomplish that for JavaScript


Even JavaScript developers need to produce documentation. JSDoc offers a solution to help generate some of that documentation from source listings. In this section, we will look at integrating JSDoc with Gradle.


It's nice to have a way to manage configuration files and settings when doing JavaScript development. In this section, we will look at how to integrate Props2Js into our Gradle builds.


To help improve the quality of our JavaScript code, we need a script loader to help us out. This section will show how to integrate Gradle with RequireJS to achieve those aims.


If you are developing JavaScript, you are most likely going to be using a lot of CSS. In this section, we will lightly cover the Gradle CSS plugin to help you deal with CSS files in your build.


In this section we broadly covered the Gradle JavaScript plugin and lightly touched on the functionality in the CSS plugin.

Section 8: Building Scala

In this section we'll learn about the Scala Plugin Support.


When starting to learn about a new plugin, it's nice to go over the basics of that plugin. In this section, we will look at enabling the Scala plugin and go over some of the tasks it provides.


To best use the Scala plugin, we need to understand how it's laid out. In this section, we will explore the layout of a Scala project and how to specify sources.


The Scala plugin offers us several options for compiler support. To help alleviate confusion, this section will take a look at compiler setup and compilation with the Scala plugin.


Dependencies are a crucial item to understand and handle for any development. Scala is no different. In this section, we will look at dependencies with the Scala plugin.


Nothing will drive a developer crazier than a slow build. In this section, we will try to save some developer sanity by seeing how we can speed up a Scala build with Fast Compiler Support.


In this section we've covered usage and Tasks, Project Layout, Compiler Setup, Dependencies, and Fast Compiler Support.

Section 9: Continuous Integration Servers

Let's understand what is Continuous Integration.


Jenkins is a very powerful continuous integration server in wide use across the industry. In this section, we will look at integrating Jenkins and Gradle. Then we will configure a Jenkins Gradle build.


TeamCity is a very solid continuous integration server made by JetBrains. It's vastly popular for companies willing to invest money into this part of their infrastructure. In this section, we will look at the support TeamCity has for Gradle and run a Gradle build.


Bamboo is Atlassian's continuous integration server. In this section, we will look at Gradle integration with Bamboo and configure a Gradle build.


In this section we learnt about what Continuous Integration is, and covered three of the most popular CI servers.

Section 10: Repository Managers

In this section we'll learn what a Repository Manager is, and which of the Repository Managers are recommended.


Artifactory is a very popular repository manager. In this section, we will look at Artifactory integration with Gradle.


Bintray is becoming more and more popular with developers. In this section, we will look at integrating your Gradle builds with bintray.


Nexus is a great standard for repository managers. In this section, we will look at Gradle integration with Nexus.


In this section we've covered publishing your project to a repository manager service, whether its Artifactory, Bintray or Nexus.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Packt Publishing, Tech Knowledge in Motion

Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.

With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.

From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.

Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.

Ready to start learning?
Take This Course