Gradle explained

ssuserdab0491 47 views 16 slides May 21, 2020
Slide 1
Slide 1 of 16
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16

About This Presentation

Some topics about Gradle that were unclear or strange for me are explained


Slide Content

Gradle explained
Andrey Mukamolov

Plan
1.Preface
2.What is build system
3.What is special about Gradle
4.Examples

Preface
●Gradle is cool but complex
●Not so much devs understand it

Build systems
Build automation is the process of automating the creation of a software build and the associated processes including:
compiling computer source code into binary code, packaging binary code, and running automated tests.
Wiki

Build automation software => build systems

Build systems: example
●Make
●Maven
●Apache Ant
●MSBuild
●Xcodebuild
●… and Gradle

What’s in common?
Do some stuff on input files and produce output files

Gradle
●Script-based builds
●Extendable
●Dependencies management
●Lots of presets
●Kotlin DSL :)

Gradle termins
●Task - executable build step: assemble, compile, jar, prepare
●Plugin - defines tasks and their order
●Module - your code etc.
●Project - set of modules

Plugins
Gradle has set of default plugins for Java, Kotlin, Groovy, etc
But you need to tell Gradle to apply them to your project

Tasks are code

Tasks are code

Tasks are code

Build cache
●Downloaded dependencies
●Compiled code
●Test results
●Processed assets

Don’t execute task if its input
haven’t changed from
previous execution

buildSrc
●Default “project”
●Can define other plugins
●Extra tasks, plugins and code
●Cover logic with tests
●Usage: extra stuff for main build scripts

Thanks!