Gradle Build Migration

Currently we are working on a migration from Apache Ant to Gradle. Gradle is a build tool which has steadily gained popularity over the last few years (Read it up: http://gradle.org/). Also there is a 3-part post about Gradle on our company's blog: A build tool named Gradle

What we want to achieve

Right now we have several projects depending on each other. All of them have their own Ant build file which are somehow connected and which are describing the dependency between these projects (all documented here: Build Process). Ant supports these dependencies poorly. With Gradle we are optimistic to get a cleaner, simpler and expandable build process with same functionality. Thus, it should make it easier for contributers to understand the overall build process. An additional advantage of Gradle is that it comes with native Ivy Dependency Management which allows us to get rid of all these different ivy.xml files and declare and manage our external dependencies at one single location. These are our paramount objectives:

  •  A comprehensive build process
  •  Better understanding of the build process
  •  Reducing internal dependencies
  •  Reducing the build duration

Current State

  • 11.10.2015 - Kickoff meeting for build requirements
  • In Progress - Change the directory structure in a more conventional manner
  • In Progress - Create a Gradle build for the projects: Commons and Agent
  • 03.11.2015 - Intermediate State: gradle_build_meeting031115.pdf
  • 03.02.2016 - Gradle Takeover by Ivan Senic

Also see Jira-Ticket: INSPECTIT-1811

Planned Steps

  • Create a own Gradle distribution where external scripts and resources can get outsourced
  • Change the project structure so that all advantages of Gradle can be used.
  • Discuss intermediate state
  • ...
  • Migrate complete build process from Ant to Gradle

Further improvements after the migration

  • Currently, we cannot reuse test classes over the different projects. Even though in Eclipse this would work, Ant with the definition of what to compile and use etc. is currently not working for this approach. With Gradle, it should be way easier to define this and thus we should see, how we can create some base test classes for all projects to be used.