Unified Build Tool using Gradle – Hierony Manurung – Background



Unified Build Tool using Gradle – Hierony Manurung – Background

0 0


HieronyM.github.io

My Awesome Blog.

On Github HieronyM / HieronyM.github.io

Unified Build Tool using Gradle

Hierony Manurung

Overview

  • Background
  • What is Gradle?
  • Why choose Gradle?
  • Gradle as Unified Build Tool
  • Task in Build template file
  • Lesson Learned
  • Future Improvement
  • Demo

Background

  • Needs of Unified Build Tool
  • PHP application using Ant, another platform using Gradle
  • Let's use 1 build tool

What is Gradle?

  • Gradle is a build automation tool
  • Build upon the concepts of Apache Ant and Apache Maven
  • Using Groovy-based domain-specific language(DSL)
  • Gradle can automate the building, testing, publishing, deployment, and more of software packages

Gradle’s motto

“Make the impossible possible, make the possible easy, and make the easy elegant”

Why Choose Gradle?

Why Choose Gradle?

Gradle as Unified Build Tool

So far, has been completed 3 Build Template files, they are :

  • PHP
  • Spring Framework
  • Android

Task in Spring Framework Template

  • Compile
  • cpd Check (Copy Paste Detector / duplicate code)
  • findbugs
  • pmd test
  • jdepend
  • javancss (Measure project size)
  • packaging

Task in PHP Template

  • Lint (Check syntax)
  • phpcpd Check (Copy Paste Detector / duplicate code)
  • phpcs
  • phpmd test
  • pdepend
  • phploc (Measure project size)
  • packaging

Task in Android Template

  • Compile
  • checkstyle
  • findbugs
  • pmd
  • javancss
  • packaging

Lesson Learned

  • Learned how to build application using Gradle
  • Learned how to migrate/convert Ant build script into Gradle
  • Learned about various technology stacks like Git, Static code Analysis tools, Docker, Jenkins, Grunt, Gulp

Future Improvement

  • Make build template file for another platform
  • Make the command line execution in the task become Cross Platform, so far still run in Windows and Linux

Demo

Sources

  • Gradle in Action, Benjamin Muschko
  • http://zeroturnaround.com/rebellabs/java-build-tools-part-2-a-decision-makers-comparison-of-maven-gradle-and-ant-ivy/10/
  • http://gradle.org/
  • http://google.com/

FIN

Thanks

Q & A