In this talk - we look at build tool landscape and new requirements arising from modern software development. We understand - why gradle has a sweet spot between rigidity of Maven and flexibility of Ant. We also have a demo for migrating maven projects to gradle.
2. Hello !!
I am Deepak Shevani
- Work for Flipkart Supply Chain team
- Interests : RESTful APIs, Reactive Apps
- Contact : shevanideepak@gmail.com
3. Agenda today !!
▧ Modern Software Development
▧ Build Tools : Landscape Analysis
▧ Gradle : new Java Build Tool
▧ Why Gradle ?
▧ Demo(s)
At end of this talk, you shall decide to try
Gradle for your next project. Hopefully :)
Target
4. Traditional Software Development ??
#TraditionalUseCases
- You Write Code
- You Compile it
- You Test (Unit testing)
- You Assemble it
- You Distribute or Publish it
- You Deploy it
5. Modern Software Development ??
#ComplexUseCases
- Need Static Code Analysis
- Need Code-style checks
- Need Findbug Analysis
- Managing Dependencies
- Incremental Compilation
- Deployment Profiles
- Automated Builds
- Need Conditional Inclusion
- Need to Run Security Scans
- Need Sonar integration
- Create Docker image
:
#TraditionalUseCases
- You Write Code
- You Compile it
- You Test (Unit testing)
- You Assemble it (JAR, WAR)
- You Distribute or Publish it
- You Deploy it
6. Modern Software Development ??
#ComplexUseCases
- Need Static Code Analysis
- Need Code-style checks
- Need Findbug Analysis
- Managing Dependencies
- Incremental Compilation
- Deployment Profiles
- Automated Builds
- Need Conditional Inclusion
- Need to Run Security Scans
- Need Sonar integration
- Create Docker image
:
#TraditionalUseCases
- You Write Code
- You Compile it
- You Test (Unit testing)
- You Assemble it
- You Distribute or Publish it
- You Deploy it
#BuildTools
- Help in Automation
- Repeatable Builds
- Predictable Behavior
10. Rebel Labs Study, 2014
#Insight-1 : Almost 6
in 10 developers want
to learn more about
this build tool.
#Insight-2 : Maven is
most used build tool
and Gradle is getting
traction
12. Why Gradle ??
Groovy
Powerful & Groovy
based expressive DSL
instead of XML
Flexible
Has flexible conventions
unlike rigid conventions
in Maven
Extensible
Plugins in Gradle add
tasks, conventions and
sensible defaults
Faster
Reduced startup time
and build time using
Gradle daemons
Scalable
Incremental builds and
support for distributed
test execution
Robust
Robust and powerful
dependency management
& reproducible builds
13. Community
Several high profile
projects like Android,
Spring framework,
Hibernate etc have
migrated their build
system to Gradle. You
will find helpful
plugins for most of
the tasks.
No more boxed in :)
Unlike Maven, which is
very opinionated like
single source directory
per project, single JAR
per project, Gradle
allows you to break out
of conventions
CI/CD
Enables you to
automate many of
the tasks required to
implement CI/CD like
compile, test, deploy
and calling external
tools. Its rich CLI and
deep programming
API opens up many
opportunities.
Why Gradle ??
16. Project Structure !!
Gradle Builds
- Has 1 or more projects
Projects
- Ex. Build JAR
- Ex. Deploy artifact
- Has 1 or more tasks
Task
- Piece of work
- Ex. Compile