SlideShare a Scribd company logo
Introduction To Gradle
Topics
1. What is Build Tool?
2. Getting Started With Gradle
3. Building JVM Projects
What is Build Tool?
● Build tools are programs that automate the creation of executable
applications from source code.
● Building incorporates compiling, linking and packaging the code into a usable
or executable form.
What is Gradle?
Gradle is an open source build automation system that builds upon the concepts
of Apache Ant and Apache Maven and introduces a Groovy-based
domain-specific language (DSL) instead of the XML form used by Apache Maven
for declaring the project configuration.
Getting Started w/ Gradle
Installing Gradle
1. Download Gradle:
wget https://services.gradle.org/distributions/gradle-3.4.1-bin.zip
2. Install Gradle
sudo mkdir /opt/gradle
sudo unzip -d /opt/gradle gradle-3.4.1-bin.zip
export PATH=$PATH:/opt/gradle/gradle-3.4.1/bin
gradle -v
Starting a project
1. mkdir projectName
2. Initialize project structure
Create & edit build.gradle
Core Components
● Projects: A project is typically some software you want to build.
● Tasks: Tasks are actions needed to build the projectTasks are actions
needed to build the project
● Build scripts: The build script is typically called build.gradle and is
normally located in the root directory of the project
Gradle Tasks
● A task might be compiling some classes, creating a JAR, generating
Javadoc, or publishing some archives to a repository
● In simple words, a project is made up of different tasks.
Task Dependencies & Ordering
● dependsOn creates an execution dependency
● All execution dependencies of a task must also be executed and
completed before the task
Task Dependencies & Ordering
● finalizedBy creates a finalization dependency
● The finalizer task is added if the finalized task is present in the task graph
Adding Dependencies
● Dependencies are added to a Configuration
● JVM projects have
compile, runtime, testCompile, testRuntime
Locating Dependencies
● Gradle supplies some default repositories to search:
jcenter, mavenCentral, mavenLocal
● Can also look at custom maven,
ivy, and file system paths
Extra Properties
Extra properties extensions allow new properties to be added to existing domain
objects. They act like maps, allowing the storage of arbitrary key/value pairs.
Variables
Build scripts are Groovy, so you can also define variables normally
Plugins
● A plugin is a set of tasks
● A gradle plugin is library of code that, when loaded by Gradle build script,
adds new functionality and capabilities to the build system.
Plugins can −
● Extend the basic Gradle model (e.g. add new DSL elements that can be
configured).
● Configure the project according to conversions (e.g. add new tasks or
configure sensible defaults).
● Apply specific configuration
Types of Plugin
● Script Plugins
Script plugins can be applied from a script on the local filesystem or at a
remote location. Filesystem locations are relative to the project directory
apply from: 'other.gradle'
● Binary Plugins
Each plugin is identified by a plugin id. Some core plugins use short names to
apply it
apply plugin: JavaPlugin
Custom Plugin
apply plugin: CustPlugin
Class CustPlugin
implements Plugin<Project> {
void apply(Project project) {
project.task('hello'){
println "CUSTOM HELL-O"
}
}
}
Publishing Artifacts
● The files the project provides to the outside world. This might be a library
or a ZIP distribution or any other file. A project can publish as many
artifacts as it wants.
● The artifacts could be published to either local system or repository url
Gradle Wrapper
● When you use the Gradle Wrapper, you embed some intelligence into
your project. When some one runs the build for the first time, they run
“gradlew” which is an automatically generated shell script (or Batch script
on Windows) designed to download Gradle. As the build manager, you
generate this file from your Gradle build so that you don't have to write
instructions for installing Gradle.
● The Gradle Wrapper takes build automation to another level - Gradle can,
effectively, install itself.
Install Gradle Wrapper
● Install the Wrapper into your project by running the wrapper task. (This
task is always available, even if you don't add it to your build)
gradle wrapper --gradle-version 2.0
Or
task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}
Thanks
Ad

More Related Content

What's hot (20)

Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
Dmitry Buzdin
 
An Introduction to Gradle for Java Developers
An Introduction to Gradle for Java DevelopersAn Introduction to Gradle for Java Developers
An Introduction to Gradle for Java Developers
Kostas Saidis
 
Building with Gradle
Building with GradleBuilding with Gradle
Building with Gradle
Kaunas Java User Group
 
Gradle
GradleGradle
Gradle
Jadson Santos
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
Izzet Mustafaiev
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
Steffen Gebert
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Opersys inc.
 
Embedded Android : System Development - Part I
Embedded Android : System Development - Part IEmbedded Android : System Development - Part I
Embedded Android : System Development - Part I
Emertxe Information Technologies Pvt Ltd
 
Migrating to Java 11
Migrating to Java 11Migrating to Java 11
Migrating to Java 11
Arto Santala
 
Introduction to Go programming language
Introduction to Go programming languageIntroduction to Go programming language
Introduction to Go programming language
Slawomir Dorzak
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
Amal Mohan N
 
Devops Porto - CI/CD at Gitlab
Devops Porto - CI/CD at GitlabDevops Porto - CI/CD at Gitlab
Devops Porto - CI/CD at Gitlab
Filipa Lacerda
 
Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
Valentin Buryakov
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
Aniruddha Chakrabarti
 
Android device driver structure introduction
Android device driver structure introductionAndroid device driver structure introduction
Android device driver structure introduction
William Liang
 
Spring Boot
Spring BootSpring Boot
Spring Boot
Jiayun Zhou
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
Robert Reiz
 
Jenkins CI presentation
Jenkins CI presentationJenkins CI presentation
Jenkins CI presentation
Jonathan Holloway
 
Introduction to Makefile
Introduction to MakefileIntroduction to Makefile
Introduction to Makefile
Zakaria El ktaoui
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
Smita Prasad
 
An Introduction to Gradle for Java Developers
An Introduction to Gradle for Java DevelopersAn Introduction to Gradle for Java Developers
An Introduction to Gradle for Java Developers
Kostas Saidis
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
Izzet Mustafaiev
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Opersys inc.
 
Migrating to Java 11
Migrating to Java 11Migrating to Java 11
Migrating to Java 11
Arto Santala
 
Introduction to Go programming language
Introduction to Go programming languageIntroduction to Go programming language
Introduction to Go programming language
Slawomir Dorzak
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
Amal Mohan N
 
Devops Porto - CI/CD at Gitlab
Devops Porto - CI/CD at GitlabDevops Porto - CI/CD at Gitlab
Devops Porto - CI/CD at Gitlab
Filipa Lacerda
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
Aniruddha Chakrabarti
 
Android device driver structure introduction
Android device driver structure introductionAndroid device driver structure introduction
Android device driver structure introduction
William Liang
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
Robert Reiz
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
Smita Prasad
 

Viewers also liked (17)

Introduction to es6
Introduction to es6Introduction to es6
Introduction to es6
NexThoughts Technologies
 
Apache tika
Apache tikaApache tika
Apache tika
NexThoughts Technologies
 
Cosmos DB Service
Cosmos DB ServiceCosmos DB Service
Cosmos DB Service
NexThoughts Technologies
 
Actors model in gpars
Actors model in gparsActors model in gpars
Actors model in gpars
NexThoughts Technologies
 
Jsoup
JsoupJsoup
Jsoup
NexThoughts Technologies
 
Reactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJavaReactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJava
NexThoughts Technologies
 
Unit test-using-spock in Grails
Unit test-using-spock in GrailsUnit test-using-spock in Grails
Unit test-using-spock in Grails
NexThoughts Technologies
 
Java 8 features
Java 8 featuresJava 8 features
Java 8 features
NexThoughts Technologies
 
Jmh
JmhJmh
Jmh
NexThoughts Technologies
 
Introduction to thymeleaf
Introduction to thymeleafIntroduction to thymeleaf
Introduction to thymeleaf
NexThoughts Technologies
 
Progressive Web-App (PWA)
Progressive Web-App (PWA)Progressive Web-App (PWA)
Progressive Web-App (PWA)
NexThoughts Technologies
 
RESTEasy
RESTEasyRESTEasy
RESTEasy
NexThoughts Technologies
 
Spring Web Flow
Spring Web FlowSpring Web Flow
Spring Web Flow
NexThoughts Technologies
 
JFree chart
JFree chartJFree chart
JFree chart
NexThoughts Technologies
 
Grails with swagger
Grails with swaggerGrails with swagger
Grails with swagger
NexThoughts Technologies
 
Hamcrest
HamcrestHamcrest
Hamcrest
NexThoughts Technologies
 
Vertx
VertxVertx
Vertx
NexThoughts Technologies
 
Ad

Similar to Introduction to gradle (20)

Gradle
GradleGradle
Gradle
Han Yin
 
Gradle,the new build system for android
Gradle,the new build system for androidGradle,the new build system for android
Gradle,the new build system for android
zhang ghui
 
Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]
Ryan Cuprak
 
Gradle - Build System
Gradle - Build SystemGradle - Build System
Gradle - Build System
Jeevesh Pandey
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
Ryan Cuprak
 
Gradle - Build system evolved
Gradle - Build system evolvedGradle - Build system evolved
Gradle - Build system evolved
Bhagwat Kumar
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
Ryan Cuprak
 
Build your android app with gradle
Build your android app with gradleBuild your android app with gradle
Build your android app with gradle
Swain Loda
 
Eclipse Buildship JUG Hamburg
Eclipse Buildship JUG HamburgEclipse Buildship JUG Hamburg
Eclipse Buildship JUG Hamburg
simonscholz
 
What's new in Gradle 4.0
What's new in Gradle 4.0What's new in Gradle 4.0
What's new in Gradle 4.0
Eric Wendelin
 
ICONUK 2015 - Gradle Up!
ICONUK 2015 - Gradle Up!ICONUK 2015 - Gradle Up!
ICONUK 2015 - Gradle Up!
René Winkelmeyer
 
7 maven vsgradle
7 maven vsgradle7 maven vsgradle
7 maven vsgradle
Avitesh Kesharwani
 
Gradle : An introduction
Gradle : An introduction Gradle : An introduction
Gradle : An introduction
Nibodha Technologies
 
Android presentation - Gradle ++
Android presentation - Gradle ++Android presentation - Gradle ++
Android presentation - Gradle ++
Javier de Pedro López
 
Gradle explained
Gradle explainedGradle explained
Gradle explained
Andrey Mukamolov
 
Pragmatic software development in kdb+
Pragmatic software development in kdb+Pragmatic software development in kdb+
Pragmatic software development in kdb+
Ajay Rathore
 
FOSDEM 2017: GitLab CI
FOSDEM 2017:  GitLab CIFOSDEM 2017:  GitLab CI
FOSDEM 2017: GitLab CI
OlinData
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
Roberto Pérez Alcolea
 
Gradle: One technology to build them all
Gradle: One technology to build them allGradle: One technology to build them all
Gradle: One technology to build them all
Bonitasoft
 
Gradle build capabilities
Gradle build capabilities Gradle build capabilities
Gradle build capabilities
Zeinab Mohamed Abdelmawla
 
Gradle,the new build system for android
Gradle,the new build system for androidGradle,the new build system for android
Gradle,the new build system for android
zhang ghui
 
Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]
Ryan Cuprak
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
Ryan Cuprak
 
Gradle - Build system evolved
Gradle - Build system evolvedGradle - Build system evolved
Gradle - Build system evolved
Bhagwat Kumar
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
Ryan Cuprak
 
Build your android app with gradle
Build your android app with gradleBuild your android app with gradle
Build your android app with gradle
Swain Loda
 
Eclipse Buildship JUG Hamburg
Eclipse Buildship JUG HamburgEclipse Buildship JUG Hamburg
Eclipse Buildship JUG Hamburg
simonscholz
 
What's new in Gradle 4.0
What's new in Gradle 4.0What's new in Gradle 4.0
What's new in Gradle 4.0
Eric Wendelin
 
Pragmatic software development in kdb+
Pragmatic software development in kdb+Pragmatic software development in kdb+
Pragmatic software development in kdb+
Ajay Rathore
 
FOSDEM 2017: GitLab CI
FOSDEM 2017:  GitLab CIFOSDEM 2017:  GitLab CI
FOSDEM 2017: GitLab CI
OlinData
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
Roberto Pérez Alcolea
 
Gradle: One technology to build them all
Gradle: One technology to build them allGradle: One technology to build them all
Gradle: One technology to build them all
Bonitasoft
 
Ad

More from NexThoughts Technologies (20)

Alexa skill
Alexa skillAlexa skill
Alexa skill
NexThoughts Technologies
 
GraalVM
GraalVMGraalVM
GraalVM
NexThoughts Technologies
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
NexThoughts Technologies
 
Apache commons
Apache commonsApache commons
Apache commons
NexThoughts Technologies
 
HazelCast
HazelCastHazelCast
HazelCast
NexThoughts Technologies
 
MySQL Pro
MySQL ProMySQL Pro
MySQL Pro
NexThoughts Technologies
 
Microservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & ReduxMicroservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & Redux
NexThoughts Technologies
 
Swagger
SwaggerSwagger
Swagger
NexThoughts Technologies
 
Solid Principles
Solid PrinciplesSolid Principles
Solid Principles
NexThoughts Technologies
 
Arango DB
Arango DBArango DB
Arango DB
NexThoughts Technologies
 
Jython
JythonJython
Jython
NexThoughts Technologies
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
NexThoughts Technologies
 
Smart Contract samples
Smart Contract samplesSmart Contract samples
Smart Contract samples
NexThoughts Technologies
 
My Doc of geth
My Doc of gethMy Doc of geth
My Doc of geth
NexThoughts Technologies
 
Geth important commands
Geth important commandsGeth important commands
Geth important commands
NexThoughts Technologies
 
Ethereum genesis
Ethereum genesisEthereum genesis
Ethereum genesis
NexThoughts Technologies
 
Ethereum
EthereumEthereum
Ethereum
NexThoughts Technologies
 
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
NexThoughts Technologies
 
An Introduction to Redux
An Introduction to ReduxAn Introduction to Redux
An Introduction to Redux
NexThoughts Technologies
 
Google authentication
Google authenticationGoogle authentication
Google authentication
NexThoughts Technologies
 

Recently uploaded (20)

Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 

Introduction to gradle

  • 2. Topics 1. What is Build Tool? 2. Getting Started With Gradle 3. Building JVM Projects
  • 3. What is Build Tool? ● Build tools are programs that automate the creation of executable applications from source code. ● Building incorporates compiling, linking and packaging the code into a usable or executable form.
  • 4. What is Gradle? Gradle is an open source build automation system that builds upon the concepts of Apache Ant and Apache Maven and introduces a Groovy-based domain-specific language (DSL) instead of the XML form used by Apache Maven for declaring the project configuration.
  • 6. Installing Gradle 1. Download Gradle: wget https://services.gradle.org/distributions/gradle-3.4.1-bin.zip 2. Install Gradle sudo mkdir /opt/gradle sudo unzip -d /opt/gradle gradle-3.4.1-bin.zip export PATH=$PATH:/opt/gradle/gradle-3.4.1/bin gradle -v
  • 7. Starting a project 1. mkdir projectName 2. Initialize project structure Create & edit build.gradle
  • 8. Core Components ● Projects: A project is typically some software you want to build. ● Tasks: Tasks are actions needed to build the projectTasks are actions needed to build the project ● Build scripts: The build script is typically called build.gradle and is normally located in the root directory of the project
  • 9. Gradle Tasks ● A task might be compiling some classes, creating a JAR, generating Javadoc, or publishing some archives to a repository ● In simple words, a project is made up of different tasks.
  • 10. Task Dependencies & Ordering ● dependsOn creates an execution dependency ● All execution dependencies of a task must also be executed and completed before the task
  • 11. Task Dependencies & Ordering ● finalizedBy creates a finalization dependency ● The finalizer task is added if the finalized task is present in the task graph
  • 12. Adding Dependencies ● Dependencies are added to a Configuration ● JVM projects have compile, runtime, testCompile, testRuntime
  • 13. Locating Dependencies ● Gradle supplies some default repositories to search: jcenter, mavenCentral, mavenLocal ● Can also look at custom maven, ivy, and file system paths
  • 14. Extra Properties Extra properties extensions allow new properties to be added to existing domain objects. They act like maps, allowing the storage of arbitrary key/value pairs.
  • 15. Variables Build scripts are Groovy, so you can also define variables normally
  • 16. Plugins ● A plugin is a set of tasks ● A gradle plugin is library of code that, when loaded by Gradle build script, adds new functionality and capabilities to the build system. Plugins can − ● Extend the basic Gradle model (e.g. add new DSL elements that can be configured). ● Configure the project according to conversions (e.g. add new tasks or configure sensible defaults). ● Apply specific configuration
  • 17. Types of Plugin ● Script Plugins Script plugins can be applied from a script on the local filesystem or at a remote location. Filesystem locations are relative to the project directory apply from: 'other.gradle' ● Binary Plugins Each plugin is identified by a plugin id. Some core plugins use short names to apply it apply plugin: JavaPlugin
  • 18. Custom Plugin apply plugin: CustPlugin Class CustPlugin implements Plugin<Project> { void apply(Project project) { project.task('hello'){ println "CUSTOM HELL-O" } } }
  • 19. Publishing Artifacts ● The files the project provides to the outside world. This might be a library or a ZIP distribution or any other file. A project can publish as many artifacts as it wants. ● The artifacts could be published to either local system or repository url
  • 20. Gradle Wrapper ● When you use the Gradle Wrapper, you embed some intelligence into your project. When some one runs the build for the first time, they run “gradlew” which is an automatically generated shell script (or Batch script on Windows) designed to download Gradle. As the build manager, you generate this file from your Gradle build so that you don't have to write instructions for installing Gradle. ● The Gradle Wrapper takes build automation to another level - Gradle can, effectively, install itself.
  • 21. Install Gradle Wrapper ● Install the Wrapper into your project by running the wrapper task. (This task is always available, even if you don't add it to your build) gradle wrapper --gradle-version 2.0 Or task wrapper(type: Wrapper) { gradleVersion = '2.0' }