SlideShare une entreprise Scribd logo
1  sur  18
PRESENTED BY: ROMIN IRANI | DECEMBER 14, 2014
Gradle : Your Friend in Android Studio
Agenda
What is Gradle ?
Gradle Features
Gradle & Android Studio
Demo : Understanding Gradle in Android
Studio
2
Gradle is ….
 Build Language
 Dependency Resolver and Manager
 Build Task scheduler and executor
 Build by Convention
 Groovy DSL
 Multi-Project Builds
 Custom Logic
 API and Plugin ecosystem
And definitions like that scare the developer in
3
Gradle actually is …
 Your friend in Android Studio
 Makes it easy to create Android Projects that can handle multiple
modules (app , library, APIs)
 Allows you to use a single Android Project to develop versions for
 Production
 Demo
 Based on simple declarative and easy to express language
 Can be run from both command line and inside Android Studio
 And other goodies …
Maybe … this is beginning to make more sense.
4
Android Developers – Wake up !
2 IDEs
Difficult to support both for Google
Official Note does mention that work
is happening on Android Studio only !
Simply Import Eclipse projects or
Export to Gradle
5
6
Android Studio : Official IDE + 1.0 Release
7
Gradle + Android Studio – In Action
 Project Basics [settings.gradle, build.gradle
(proj+modules)]
 Plugins + Tasks + Convention = Magic
 Module Settings – UI into build.gradle
 Gradle Tasks – Command Line + Window
 Multi – Module Projects
 Build Types– Debug / Release
 Flavors – Demo / Full
 See another sample Project
8
Project Basics
9
• Project Root : settings.gradle,
build.gradle
• Module Root : build.gradle
Android Plugin
10
• apply plugin:
'com.android.application'• Android DSL
Module Settings
11
• Modify build.gradle OR
• Via Module Settings UI
Gradle Tasks
12
• Command Line
• Gradle Commander
Multi Module Projects
13
• settings.gradle at Root
• Each folder at root is a module
• build.gradle in each module
• specific plugins
• mention Dependencies
• Example : Android + Cloud Module
Build Types & Build Tasks
 assemble
 check
 build
 clean
14
 debug
 release
Product Flavors
 Allows you to build multiple variants of the same application
 demo
 full
 For e.g. 2 Config Types and 2 Flavors = 4 combinations
 demoRelease
 demoDebug
 fullRelease
 fullDebug
 Apply separate resources
 Apply separate source files
15
Product Flavors - continued
16
In Summary
17
Thank You + Q & A
 Email : romin.irani@mindstormsoftware.com
 Twitter : @iRomin
 Blog : http://www.rominirani.com
18

Contenu connexe

Tendances

Project a day 2 introduction to android studio
Project a day 2   introduction to android studioProject a day 2   introduction to android studio
Project a day 2 introduction to android studio
Goran Djonovic
 

Tendances (20)

Exploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & BeyondExploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & Beyond
 
Android studio
Android studioAndroid studio
Android studio
 
Introduction to Android Studio
Introduction to Android StudioIntroduction to Android Studio
Introduction to Android Studio
 
Project a day 2 introduction to android studio
Project a day 2   introduction to android studioProject a day 2   introduction to android studio
Project a day 2 introduction to android studio
 
Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster
 
A/B test your Android build setup with ASPoet
A/B test your Android build setup with ASPoetA/B test your Android build setup with ASPoet
A/B test your Android build setup with ASPoet
 
[DEPRECATED]Gradle the android
[DEPRECATED]Gradle the android[DEPRECATED]Gradle the android
[DEPRECATED]Gradle the android
 
Intro to Flutter
Intro to FlutterIntro to Flutter
Intro to Flutter
 
Getting started with building your own standalone Gradle plugin
Getting started with building your own standalone Gradle pluginGetting started with building your own standalone Gradle plugin
Getting started with building your own standalone Gradle plugin
 
Golang start and tips
Golang start and tipsGolang start and tips
Golang start and tips
 
Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studio
 
Android Made Simple
Android Made SimpleAndroid Made Simple
Android Made Simple
 
(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi
 
Study Jam: Android for Beginners, Summary
Study Jam: Android for Beginners, SummaryStudy Jam: Android for Beginners, Summary
Study Jam: Android for Beginners, Summary
 
Why golang
Why golangWhy golang
Why golang
 
Porting golang development environment developed with golang
Porting golang development environment developed with golangPorting golang development environment developed with golang
Porting golang development environment developed with golang
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
D8 Dexer
D8 Dexer D8 Dexer
D8 Dexer
 
Intro to Flutter SDK
Intro to Flutter SDKIntro to Flutter SDK
Intro to Flutter SDK
 
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組みReact Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
 

En vedette

Android User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAndroid User Interface: Basic Form Widgets
Android User Interface: Basic Form Widgets
Ahsanul Karim
 
Android seminar ppt
Android seminar pptAndroid seminar ppt
Android seminar ppt
chakrapani tripathi
 

En vedette (17)

The world of gradle - an introduction for developers
The world of gradle  - an introduction for developersThe world of gradle  - an introduction for developers
The world of gradle - an introduction for developers
 
Android activities & views
Android activities & viewsAndroid activities & views
Android activities & views
 
Gradle for Android Developers
Gradle for Android DevelopersGradle for Android Developers
Gradle for Android Developers
 
つ部 Android Studio 勉強会 12/7
つ部 Android Studio 勉強会 12/7つ部 Android Studio 勉強会 12/7
つ部 Android Studio 勉強会 12/7
 
Android gradle-build-system-overview
Android gradle-build-system-overviewAndroid gradle-build-system-overview
Android gradle-build-system-overview
 
Android Studio - Tips, Tricks & little known features
Android Studio - Tips, Tricks & little known features Android Studio - Tips, Tricks & little known features
Android Studio - Tips, Tricks & little known features
 
The Journey to conversational interfaces
The Journey to conversational interfacesThe Journey to conversational interfaces
The Journey to conversational interfaces
 
Intents in Android
Intents in AndroidIntents in Android
Intents in Android
 
Android Studio 2.3 New Features
Android Studio 2.3 New FeaturesAndroid Studio 2.3 New Features
Android Studio 2.3 New Features
 
Lecture 5: Storage: Saving Data Database, Files & Preferences
Lecture 5: Storage: Saving Data Database, Files & PreferencesLecture 5: Storage: Saving Data Database, Files & Preferences
Lecture 5: Storage: Saving Data Database, Files & Preferences
 
Android User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAndroid User Interface: Basic Form Widgets
Android User Interface: Basic Form Widgets
 
Android Studio NDK(JNI) + OpenCV 完整教學
Android Studio NDK(JNI) + OpenCV 完整教學Android Studio NDK(JNI) + OpenCV 完整教學
Android Studio NDK(JNI) + OpenCV 完整教學
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android Studio
 
My presentation on Android in my college
My presentation on Android in my collegeMy presentation on Android in my college
My presentation on Android in my college
 
Android seminar ppt
Android seminar pptAndroid seminar ppt
Android seminar ppt
 
How to setup unit testing in Android Studio
How to setup unit testing in Android StudioHow to setup unit testing in Android Studio
How to setup unit testing in Android Studio
 
Android ppt
Android ppt Android ppt
Android ppt
 

Similaire à Gradle and Android Studio : Best of Friends

androidPramming.ppt
androidPramming.pptandroidPramming.ppt
androidPramming.ppt
BijayKc16
 

Similaire à Gradle and Android Studio : Best of Friends (20)

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
 
Android studio 4.0 new features preview
Android studio 4.0 new features previewAndroid studio 4.0 new features preview
Android studio 4.0 new features preview
 
Mastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental pluginMastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
 
Android Session.pdf
Android Session.pdfAndroid Session.pdf
Android Session.pdf
 
Android
AndroidAndroid
Android
 
Android Studio vs. ADT
Android Studio vs. ADTAndroid Studio vs. ADT
Android Studio vs. ADT
 
9780134433646 annuzzi ch02 (1)
9780134433646 annuzzi ch02 (1)9780134433646 annuzzi ch02 (1)
9780134433646 annuzzi ch02 (1)
 
Android presentation - Gradle ++
Android presentation - Gradle ++Android presentation - Gradle ++
Android presentation - Gradle ++
 
Gradle build capabilities
Gradle build capabilities Gradle build capabilities
Gradle build capabilities
 
Android
AndroidAndroid
Android
 
androidPramming.ppt
androidPramming.pptandroidPramming.ppt
androidPramming.ppt
 
android-developer-jobs
android-developer-jobs android-developer-jobs
android-developer-jobs
 
Mastering the Android Developer Jobs: Essential Questions and Best Practices
Mastering the Android Developer Jobs: Essential Questions and Best PracticesMastering the Android Developer Jobs: Essential Questions and Best Practices
Mastering the Android Developer Jobs: Essential Questions and Best Practices
 
Intellij idea features
Intellij idea featuresIntellij idea features
Intellij idea features
 
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
 
Asj session 2 - kirthik
Asj   session 2 - kirthikAsj   session 2 - kirthik
Asj session 2 - kirthik
 
Android studio
Android studioAndroid studio
Android studio
 
Getting started with android studio
Getting started with android studioGetting started with android studio
Getting started with android studio
 
20MCE11_MAD_intro.pptx
20MCE11_MAD_intro.pptx20MCE11_MAD_intro.pptx
20MCE11_MAD_intro.pptx
 
Groovy android
Groovy androidGroovy android
Groovy android
 

Plus de Romin Irani

Android developer webinar-march-2012-mindstormsoftware
Android developer webinar-march-2012-mindstormsoftwareAndroid developer webinar-march-2012-mindstormsoftware
Android developer webinar-march-2012-mindstormsoftware
Romin Irani
 

Plus de Romin Irani (15)

Google Cloud Platform Update - NEXT 2017
Google Cloud Platform Update - NEXT 2017Google Cloud Platform Update - NEXT 2017
Google Cloud Platform Update - NEXT 2017
 
Introduction to Google Cloud Machine Learning APIs
Introduction to Google Cloud Machine Learning APIsIntroduction to Google Cloud Machine Learning APIs
Introduction to Google Cloud Machine Learning APIs
 
Blogging Tips - A guide to why you should blog
Blogging Tips - A guide to why you should blogBlogging Tips - A guide to why you should blog
Blogging Tips - A guide to why you should blog
 
How to Contribute to your Project
How to Contribute to your ProjectHow to Contribute to your Project
How to Contribute to your Project
 
Go Language Hands-on Workshop Material
Go Language Hands-on Workshop MaterialGo Language Hands-on Workshop Material
Go Language Hands-on Workshop Material
 
Google Cloud Platform Updates
Google Cloud Platform UpdatesGoogle Cloud Platform Updates
Google Cloud Platform Updates
 
Internet of Things Overview
Internet of Things OverviewInternet of Things Overview
Internet of Things Overview
 
Powering your Apps via Google Cloud Platform
Powering your Apps via Google Cloud PlatformPowering your Apps via Google Cloud Platform
Powering your Apps via Google Cloud Platform
 
How to get business ready for Wearables: GDayX Mumbai 2014
How to get business ready for Wearables: GDayX Mumbai 2014How to get business ready for Wearables: GDayX Mumbai 2014
How to get business ready for Wearables: GDayX Mumbai 2014
 
Development Workshop on ET1, Android and Motorola RhoElements
Development Workshop on ET1, Android and Motorola RhoElementsDevelopment Workshop on ET1, Android and Motorola RhoElements
Development Workshop on ET1, Android and Motorola RhoElements
 
Talk on Future of Enterprise Mobile App Development
Talk on Future of Enterprise Mobile App DevelopmentTalk on Future of Enterprise Mobile App Development
Talk on Future of Enterprise Mobile App Development
 
Android developer webinar-march-2012-mindstormsoftware
Android developer webinar-march-2012-mindstormsoftwareAndroid developer webinar-march-2012-mindstormsoftware
Android developer webinar-march-2012-mindstormsoftware
 
HTML5 Webinar - Mind Storm Software
HTML5 Webinar - Mind Storm SoftwareHTML5 Webinar - Mind Storm Software
HTML5 Webinar - Mind Storm Software
 
Smart Computing : Cloud + Mobile + Social
Smart Computing : Cloud + Mobile + SocialSmart Computing : Cloud + Mobile + Social
Smart Computing : Cloud + Mobile + Social
 
Thadomal IEEE-HTML5-Workshop
Thadomal IEEE-HTML5-WorkshopThadomal IEEE-HTML5-Workshop
Thadomal IEEE-HTML5-Workshop
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

Gradle and Android Studio : Best of Friends

  • 1. PRESENTED BY: ROMIN IRANI | DECEMBER 14, 2014 Gradle : Your Friend in Android Studio
  • 2. Agenda What is Gradle ? Gradle Features Gradle & Android Studio Demo : Understanding Gradle in Android Studio 2
  • 3. Gradle is ….  Build Language  Dependency Resolver and Manager  Build Task scheduler and executor  Build by Convention  Groovy DSL  Multi-Project Builds  Custom Logic  API and Plugin ecosystem And definitions like that scare the developer in 3
  • 4. Gradle actually is …  Your friend in Android Studio  Makes it easy to create Android Projects that can handle multiple modules (app , library, APIs)  Allows you to use a single Android Project to develop versions for  Production  Demo  Based on simple declarative and easy to express language  Can be run from both command line and inside Android Studio  And other goodies … Maybe … this is beginning to make more sense. 4
  • 5. Android Developers – Wake up ! 2 IDEs Difficult to support both for Google Official Note does mention that work is happening on Android Studio only ! Simply Import Eclipse projects or Export to Gradle 5
  • 6. 6 Android Studio : Official IDE + 1.0 Release
  • 7. 7
  • 8. Gradle + Android Studio – In Action  Project Basics [settings.gradle, build.gradle (proj+modules)]  Plugins + Tasks + Convention = Magic  Module Settings – UI into build.gradle  Gradle Tasks – Command Line + Window  Multi – Module Projects  Build Types– Debug / Release  Flavors – Demo / Full  See another sample Project 8
  • 9. Project Basics 9 • Project Root : settings.gradle, build.gradle • Module Root : build.gradle
  • 10. Android Plugin 10 • apply plugin: 'com.android.application'• Android DSL
  • 11. Module Settings 11 • Modify build.gradle OR • Via Module Settings UI
  • 12. Gradle Tasks 12 • Command Line • Gradle Commander
  • 13. Multi Module Projects 13 • settings.gradle at Root • Each folder at root is a module • build.gradle in each module • specific plugins • mention Dependencies • Example : Android + Cloud Module
  • 14. Build Types & Build Tasks  assemble  check  build  clean 14  debug  release
  • 15. Product Flavors  Allows you to build multiple variants of the same application  demo  full  For e.g. 2 Config Types and 2 Flavors = 4 combinations  demoRelease  demoDebug  fullRelease  fullDebug  Apply separate resources  Apply separate source files 15
  • 16. Product Flavors - continued 16
  • 18. Thank You + Q & A  Email : romin.irani@mindstormsoftware.com  Twitter : @iRomin  Blog : http://www.rominirani.com 18