Submit Search
Upload
Gradle Android Build System Guide
•
0 likes
•
606 views
AI-enhanced title
D
Dicoding
Follow
ID Android TechTalk Series #6 : Google Service and Gradle - Anton Nurdin Tuhadiansyah
Read less
Read more
Technology
Report
Share
Report
Share
1 of 60
Download now
Download to read offline
Recommended
I/O Extended (GDG Bogor) - Andrew Kurniadi
I/O Extended (GDG Bogor) - Andrew Kurniadi
Dicoding
High Performance NodeJS
High Performance NodeJS
Dicoding
Gradle presentation
Gradle presentation
Oriol Jiménez
Gradle,the new build system for android
Gradle,the new build system for android
zhang ghui
Gradle
Gradle
Return on Intelligence
Android presentation - Gradle ++
Android presentation - Gradle ++
Javier de Pedro López
Gradle by Example
Gradle by Example
Eric Wendelin
Gradle 3.0: Unleash the Daemon!
Gradle 3.0: Unleash the Daemon!
Eric Wendelin
Recommended
I/O Extended (GDG Bogor) - Andrew Kurniadi
I/O Extended (GDG Bogor) - Andrew Kurniadi
Dicoding
High Performance NodeJS
High Performance NodeJS
Dicoding
Gradle presentation
Gradle presentation
Oriol Jiménez
Gradle,the new build system for android
Gradle,the new build system for android
zhang ghui
Gradle
Gradle
Return on Intelligence
Android presentation - Gradle ++
Android presentation - Gradle ++
Javier de Pedro López
Gradle by Example
Gradle by Example
Eric Wendelin
Gradle 3.0: Unleash the Daemon!
Gradle 3.0: Unleash the Daemon!
Eric Wendelin
How to create an Angular builder
How to create an Angular builder
Maurizio Vitale
Gradle : An introduction
Gradle : An introduction
Nibodha Technologies
PuppetConf 2016: Docker, Mesos, Kubernetes and...Puppet? Don't Panic! – Deep...
PuppetConf 2016: Docker, Mesos, Kubernetes and...Puppet? Don't Panic! – Deep...
Puppet
PROMAND 2014 project structure
PROMAND 2014 project structure
Alexey Buzdin
Introduction to Kubernetes with demo
Introduction to Kubernetes with demo
Opsta
Gradle - time for a new build
Gradle - time for a new build
Igor Khotin
Gradle - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
Izzet Mustafaiev
Android Jetpack + Coroutines: To infinity and beyond
Android Jetpack + Coroutines: To infinity and beyond
Ramon Ribeiro Rabello
Vue.js Use Cases
Vue.js Use Cases
GlobalLogic Ukraine
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
ZeroTurnaround
How we can do Multi-Tenancy on Kubernetes
How we can do Multi-Tenancy on Kubernetes
Opsta
Making the Most of Your Gradle Builds
Making the Most of Your Gradle Builds
Egor Andreevich
React nativebeginner1
React nativebeginner1
Oswald Campesato
Griffon: Re-imaging Desktop Java Technology
Griffon: Re-imaging Desktop Java Technology
James Williams
Overview of Android Infrastructure
Overview of Android Infrastructure
Alexey Buzdin
An Introduction to Gradle for Java Developers
An Introduction to Gradle for Java Developers
Kostas Saidis
Gradle Introduction
Gradle Introduction
Dmitry Buzdin
Introduction to gradle
Introduction to gradle
NexThoughts Technologies
Gradle
Gradle
Jadson Santos
Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019
Matt Raible
Continuous Integration & Continuous Delivery on Android - Nur Rendra Toro Sin...
Continuous Integration & Continuous Delivery on Android - Nur Rendra Toro Sin...
Dicoding
Talkshow - Android N & I/O Update
Talkshow - Android N & I/O Update
Dicoding
More Related Content
What's hot
How to create an Angular builder
How to create an Angular builder
Maurizio Vitale
Gradle : An introduction
Gradle : An introduction
Nibodha Technologies
PuppetConf 2016: Docker, Mesos, Kubernetes and...Puppet? Don't Panic! – Deep...
PuppetConf 2016: Docker, Mesos, Kubernetes and...Puppet? Don't Panic! – Deep...
Puppet
PROMAND 2014 project structure
PROMAND 2014 project structure
Alexey Buzdin
Introduction to Kubernetes with demo
Introduction to Kubernetes with demo
Opsta
Gradle - time for a new build
Gradle - time for a new build
Igor Khotin
Gradle - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
Izzet Mustafaiev
Android Jetpack + Coroutines: To infinity and beyond
Android Jetpack + Coroutines: To infinity and beyond
Ramon Ribeiro Rabello
Vue.js Use Cases
Vue.js Use Cases
GlobalLogic Ukraine
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
ZeroTurnaround
How we can do Multi-Tenancy on Kubernetes
How we can do Multi-Tenancy on Kubernetes
Opsta
Making the Most of Your Gradle Builds
Making the Most of Your Gradle Builds
Egor Andreevich
React nativebeginner1
React nativebeginner1
Oswald Campesato
Griffon: Re-imaging Desktop Java Technology
Griffon: Re-imaging Desktop Java Technology
James Williams
Overview of Android Infrastructure
Overview of Android Infrastructure
Alexey Buzdin
An Introduction to Gradle for Java Developers
An Introduction to Gradle for Java Developers
Kostas Saidis
Gradle Introduction
Gradle Introduction
Dmitry Buzdin
Introduction to gradle
Introduction to gradle
NexThoughts Technologies
Gradle
Gradle
Jadson Santos
Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019
Matt Raible
What's hot
(20)
How to create an Angular builder
How to create an Angular builder
Gradle : An introduction
Gradle : An introduction
PuppetConf 2016: Docker, Mesos, Kubernetes and...Puppet? Don't Panic! – Deep...
PuppetConf 2016: Docker, Mesos, Kubernetes and...Puppet? Don't Panic! – Deep...
PROMAND 2014 project structure
PROMAND 2014 project structure
Introduction to Kubernetes with demo
Introduction to Kubernetes with demo
Gradle - time for a new build
Gradle - time for a new build
Gradle - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
Android Jetpack + Coroutines: To infinity and beyond
Android Jetpack + Coroutines: To infinity and beyond
Vue.js Use Cases
Vue.js Use Cases
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
How we can do Multi-Tenancy on Kubernetes
How we can do Multi-Tenancy on Kubernetes
Making the Most of Your Gradle Builds
Making the Most of Your Gradle Builds
React nativebeginner1
React nativebeginner1
Griffon: Re-imaging Desktop Java Technology
Griffon: Re-imaging Desktop Java Technology
Overview of Android Infrastructure
Overview of Android Infrastructure
An Introduction to Gradle for Java Developers
An Introduction to Gradle for Java Developers
Gradle Introduction
Gradle Introduction
Introduction to gradle
Introduction to gradle
Gradle
Gradle
Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019
Viewers also liked
Continuous Integration & Continuous Delivery on Android - Nur Rendra Toro Sin...
Continuous Integration & Continuous Delivery on Android - Nur Rendra Toro Sin...
Dicoding
Talkshow - Android N & I/O Update
Talkshow - Android N & I/O Update
Dicoding
ID Android TechTalk Series #6 : Google Service and Gradle - Ibnu Sina Wardy
ID Android TechTalk Series #6 : Google Service and Gradle - Ibnu Sina Wardy
Dicoding
I/O Extended (GDG Bogor) - Narenda Wicaksono
I/O Extended (GDG Bogor) - Narenda Wicaksono
Dicoding
Menjadi Tuan Rumah di Negeri Sendiri - Fauzil Hamdi (CEO The Wali)
Menjadi Tuan Rumah di Negeri Sendiri - Fauzil Hamdi (CEO The Wali)
Dicoding
Produktif dalam Membangun Game - Adam Ardisasmita (Arsakids)
Produktif dalam Membangun Game - Adam Ardisasmita (Arsakids)
Dicoding
Mencari Genre Game yang Sesuai Passion - Cipto Adiguno (Ekuator Games)
Mencari Genre Game yang Sesuai Passion - Cipto Adiguno (Ekuator Games)
Dicoding
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
Dicoding
ID Developer Elite
ID Developer Elite
Dicoding
Sidiq Permana - Building For The Next Billion Users
Sidiq Permana - Building For The Next Billion Users
Dicoding
Yoza Aprilio - We must design
Yoza Aprilio - We must design
Dicoding
ID Android Dev Talk - Observer Pattern, Event Bus Usage, Firebase & Geofire
ID Android Dev Talk - Observer Pattern, Event Bus Usage, Firebase & Geofire
Dicoding
Agus Hamonangan - Sejarah Android, Penetrasi/Pertumbungan, dan Peluang Smartp...
Agus Hamonangan - Sejarah Android, Penetrasi/Pertumbungan, dan Peluang Smartp...
Dicoding
I/O Extended (GDG Bogor) - Sidiq Permana
I/O Extended (GDG Bogor) - Sidiq Permana
Dicoding
Agate Presentation at Gedebuk Coy!
Agate Presentation at Gedebuk Coy!
Gedebuk.org
Develop a Game - And interact with your Community | by Two Pi Team
Develop a Game - And interact with your Community | by Two Pi Team
Two Pi Team
About indonesia Game Industry - Agate Studio
About indonesia Game Industry - Agate Studio
Arief Widhiyasa
Indonesia Game Ecosystem Outlook 2017
Indonesia Game Ecosystem Outlook 2017
Ricky Setiawan
Rendra Toro - Model View Presenter
Rendra Toro - Model View Presenter
Dicoding
Introduction to Android - Seminar
Introduction to Android - Seminar
Akshay Sharma
Viewers also liked
(20)
Continuous Integration & Continuous Delivery on Android - Nur Rendra Toro Sin...
Continuous Integration & Continuous Delivery on Android - Nur Rendra Toro Sin...
Talkshow - Android N & I/O Update
Talkshow - Android N & I/O Update
ID Android TechTalk Series #6 : Google Service and Gradle - Ibnu Sina Wardy
ID Android TechTalk Series #6 : Google Service and Gradle - Ibnu Sina Wardy
I/O Extended (GDG Bogor) - Narenda Wicaksono
I/O Extended (GDG Bogor) - Narenda Wicaksono
Menjadi Tuan Rumah di Negeri Sendiri - Fauzil Hamdi (CEO The Wali)
Menjadi Tuan Rumah di Negeri Sendiri - Fauzil Hamdi (CEO The Wali)
Produktif dalam Membangun Game - Adam Ardisasmita (Arsakids)
Produktif dalam Membangun Game - Adam Ardisasmita (Arsakids)
Mencari Genre Game yang Sesuai Passion - Cipto Adiguno (Ekuator Games)
Mencari Genre Game yang Sesuai Passion - Cipto Adiguno (Ekuator Games)
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
ID Developer Elite
ID Developer Elite
Sidiq Permana - Building For The Next Billion Users
Sidiq Permana - Building For The Next Billion Users
Yoza Aprilio - We must design
Yoza Aprilio - We must design
ID Android Dev Talk - Observer Pattern, Event Bus Usage, Firebase & Geofire
ID Android Dev Talk - Observer Pattern, Event Bus Usage, Firebase & Geofire
Agus Hamonangan - Sejarah Android, Penetrasi/Pertumbungan, dan Peluang Smartp...
Agus Hamonangan - Sejarah Android, Penetrasi/Pertumbungan, dan Peluang Smartp...
I/O Extended (GDG Bogor) - Sidiq Permana
I/O Extended (GDG Bogor) - Sidiq Permana
Agate Presentation at Gedebuk Coy!
Agate Presentation at Gedebuk Coy!
Develop a Game - And interact with your Community | by Two Pi Team
Develop a Game - And interact with your Community | by Two Pi Team
About indonesia Game Industry - Agate Studio
About indonesia Game Industry - Agate Studio
Indonesia Game Ecosystem Outlook 2017
Indonesia Game Ecosystem Outlook 2017
Rendra Toro - Model View Presenter
Rendra Toro - Model View Presenter
Introduction to Android - Seminar
Introduction to Android - Seminar
Similar to Gradle Android Build System Guide
Hands on the gradle
Hands on the gradle
Kostiantyn Zghirovskyi
Android 101 - Introduction to Android Development
Android 101 - Introduction to Android Development
Andy Scherzinger
Android Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start Guide
Sergii Zhuk
Hello, Android Studio 3.2 & Android App Bundle @ I/O Extended Bangkok 2018
Hello, Android Studio 3.2 & Android App Bundle @ I/O Extended Bangkok 2018
Somkiat Khitwongwattana
Android gradle-build-system-overview
Android gradle-build-system-overview
Kevin He
lecture-2-android-dev.pdf
lecture-2-android-dev.pdf
jakjak36
01 02 - introduction - adroid stack
01 02 - introduction - adroid stack
Siva Kumar reddy Vasipally
Deploying artifacts to archiva
Deploying artifacts to archiva
allanh0526
Android app development lesson 1
Android app development lesson 1
Kalluri Vinay Reddy
Android Studio簡介
Android Studio簡介
Walter Shi
Android
Android
Lina Shamiah
Android Development
Android Development
John Mark ジョンマーク
Android session-1-sajib
Android session-1-sajib
Hussain Behestee
3. Android Architecture.pptx
3. Android Architecture.pptx
HarshiniB11
Android dev o_auth
Android dev o_auth
lzongren
Notes Unit2.pptx
Notes Unit2.pptx
MIT Autonomous Aurangabad
Android
Android
Nirav Ranpara
Android Basic
Android Basic
Nirav Ranpara
Android installation guide
Android installation guide
magicshui
Getting started with the NDK
Getting started with the NDK
Kirill Kounik
Similar to Gradle Android Build System Guide
(20)
Hands on the gradle
Hands on the gradle
Android 101 - Introduction to Android Development
Android 101 - Introduction to Android Development
Android Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start Guide
Hello, Android Studio 3.2 & Android App Bundle @ I/O Extended Bangkok 2018
Hello, Android Studio 3.2 & Android App Bundle @ I/O Extended Bangkok 2018
Android gradle-build-system-overview
Android gradle-build-system-overview
lecture-2-android-dev.pdf
lecture-2-android-dev.pdf
01 02 - introduction - adroid stack
01 02 - introduction - adroid stack
Deploying artifacts to archiva
Deploying artifacts to archiva
Android app development lesson 1
Android app development lesson 1
Android Studio簡介
Android Studio簡介
Android
Android
Android Development
Android Development
Android session-1-sajib
Android session-1-sajib
3. Android Architecture.pptx
3. Android Architecture.pptx
Android dev o_auth
Android dev o_auth
Notes Unit2.pptx
Notes Unit2.pptx
Android
Android
Android Basic
Android Basic
Android installation guide
Android installation guide
Getting started with the NDK
Getting started with the NDK
Recently uploaded
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
BkGupta21
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
LoriGlavin3
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Alex Barbosa Coqueiro
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
ScyllaDB
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Dubai Multi Commodity Centre
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Slibray Presentation
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Precisely
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
Raghuram Pandurangan
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
gvaughan
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
Lars Bell
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
UiPathCommunity
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
Hervé Boutemy
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Kalema Edgar
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
LoriGlavin3
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
LoriGlavin3
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
Dilum Bandara
Recently uploaded
(20)
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
Gradle Android Build System Guide
1.
Anton Nurdin T Senior
Software Engineer, Xendit anton46.com DEEP UNDERSTANDING ABOUT
2.
What is Gradle?
3.
Android Build System
4.
Android Build System ant Maven Gradle SBT buck
5.
Build Process
6.
7.
Multi-Language Resource/Code Generation Platform Diversity
8.
Why Gradle? 1. Powerful
Build System - Declarative, Flexible - Imperative Customization - Tooling API 2. Build System Toolkit - Plugins create own DSL, APIs, IDE integration 3. Free/Open Source
9.
Structure Settings File - settings.gradle
10.
Structure Settings File - settings.gradle Top-level
Build File
11.
Top-level Build File buildscript
{ repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.0.0' } } allprojects { repositories { jcenter() } } build.gradle
12.
Structure Settings File - settings.gradle Top-level
Build File
13.
Structure Settings File - settings.gradle Top-level
Build File Module-level Build File
14.
apply plugin: 'com.android.application' android
{ compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { ... } buildTypes { ... } productFlavors { ... } } dependencies { ... } Module-level Build File build.gradle
15.
Gradle Tasks assemble check build clean assemble +
check assembleDebug + assembleRelease connectedCheck deviceCheck
16.
COSTUMIZATION
17.
Basic Customization android { compileSdkVersion
23 buildToolsVersion "23.0.3" defaultConfig { minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" } } build.gradle
18.
Basic Customization def getVersionCode()
{ def code = ... return code; } android { defaultConfig { versionCode getVersionCode() ... } } build.gradle
19.
Basic Customization android { defaultConfig
{ applicationId “com.example.app” minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" applicationVariants.all { variant -> variant.outputs.each { output -> def file = output.outputFile def fileName = file.name.replace(".apk", "-v" + versionName + "-c" + versionCode + ".apk") output.outputFile = new File(file.parentFile, fileName) } } } } build.gradle
20.
Basic Customization app-debug-v1.0-c1.apk app-release-v1.0-c1.apk
21.
Build Types - Build
/ Packaging customization • Debuggable flag • ProGuard • Signing Configuration • Source / Resource Overlay - Debug and release prebuilt
22.
Build Types android { buildTypes
{ debug { applicationIdSuffix '.debug' versionNameSuffix '-DEBUG' } beta { applicationIdSuffix '.beta' versionNameSuffix '-BETA' } } } build.gradle
23.
Build Types :
Source Folder src/main/AndroidManifest.xml src/main/java src/main/resource src/main/res src/main/assets src/main/aidl src/main/rs src/main/jni src/debug/... src/release/... src/beta/... src/androidTest/java src/androidTest/resource src/androidTest/res src/androidTest/assets src/androidTest/aidl src/androidTest/rs src/androidTest/jni
24.
Gradle Tasks assemble check build clean assemble +
check assembleDebug + assembleRelease + assembleBeta connectedCheck deviceCheck
25.
Signing Configuration android { signingConfigs
{ release { storeFile file('<name>.keystore') keyAlias 'keyAlias' keyPassword 'keyPassword' storePassword 'storePassword' } } } build.gradle
26.
Debuggable Release Builds android
{ signingConfigs { debugRelease.intiWith(buildTypes.release) debugRelease { debuggable true applicationIdSuffix '.debugrelease' signingConfig signingConfigs.debug } } } build.gradle
27.
DEPENDENCIES
28.
Dependency Scope: Java
Projects compile runtime testCompile testRuntime
29.
Dependency Scope: Android
Projects compile runtime testCompile testRuntime compile package androidTestCompile androidTestPackage
30.
Local Dependencies android { ... } dependencies
{ compile fileTree(dir: 'libs', include: ['*.jar']) } build.gradle
31.
Remote Dependencies repositories {
jcenter() } android { ... } dependencies { compile 'com.android.support:appcompat-v7:23.2.1' } build.gradle
32.
Multi-Project Setup settings.gradle include ':app' include
':libraries:lib1' include ':libraries:lib2' MyProject/ | settings.gradle + app/ | build.gradle + libraries/ + lib1/ | build.gradle + lib2/ | build.gradle
33.
Project Dependencies android { ... } dependencies
{ compile project(‘:libraries:lib1’) } build.gradle
34.
Android Library Project apply
plugin: 'com.android.library' android { compileSdkVersion 23 buildToolsVersion '23.0.1' } build.gradle
35.
Android Library - Binary
Bundle (.aar) • Uploadable to repositories - Support for • assets • Proguard rules • Custom Lint rules • . . .
36.
BUILD VARIANTS
37.
Product Flavors - Different
versions of the same application • Paid vs Free • Multi-APK support in Google Play - Different Dimension(s) than BuildTypes
38.
Android Library Project android
{ productFlavors { flavour1 { applicationId "com.example.flavour1" minSdkVersion 16 } flavour2 { applicationId "com.example.flavour2" } } } build.gradle
39.
Build Types :
Source Folder src/main/AndroidManifest.xml src/main/java src/main/resource src/main/res src/main/assets src/main/aidl src/main/rs src/main/jni src/androidTest/java src/androidTest/resource src/androidTest/res src/androidTest/assets src/androidTest/aidl src/androidTest/rs src/androidTest/jni src/debug/... src/release/... src/beta/... src/flavor1/... src/androidTestFlavor1/...
40.
Variant = Build
Type + Product Flavor(s) No Flavors : debug release - debug release - - -
41.
Variant = Build
Type + Product Flavor(s) No Flavors : debug release - debug release - - - With Flavors : debug release Flavor1 Flavor1Debug Flavor1Release Flavor2 Flavor2Debug Flavor2Release
42.
Build Variants :
Source Code Multiple source folders, single output src/main/java src/debug/java src/free/java
43.
Build Variants :
Resource Overlays src/main/res src/debug/res src/free/res
44.
Build Variants :
Signing Configuration Priority Order android.defaultConfig.signingConfig android.buildTypes.release.signingConfig android.productFlavors.free.signingConfig
45.
Build Variants :
Package Name Overlays + Suffix android.defaultConfig.packageName android.productFlavors.free.signingConfig + android.buildTypes.debug.packageNameSuffix src/main/AndroidManifest.xml
46.
Build Variants :
Proguard android { ... buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } productFlavors { flavor2 { proguardFile 'flavor2-rules.pro' } } } build.gradle
47.
Res / Code
Generation buildConfigField resValue
48.
build.gradle android { buildTypes { debug
{ buildConfigField "String", "SERVER_URL", '"http://staging.example.co"' resValue "string", "facebook_app_id", '"12345678910' ... } release { buildConfigField "String", "SERVER_URL", '"https://example.co"' resValue "string", "facebook_app_id", '"0987654321' ... } } } Res / Code Generation
49.
PERFORMACE
50.
GRADLE IS FAST
51.
GRADLE IS FAST 200
Projects grade clean assemble —-parallel 7s
52.
• Android Studio
IDE (Android Tooling Team) • Gradle Android Plugin (Android Tooling Team) • Gradle Flatform (Gradle Team) • Android Tooling (Android Platform Team) Toolchain
53.
BOTLENECK
54.
Clean Install (61.9s) 1%8% 46%
27% 3% 14% Install (8.89s) After Dexing (2.06s) Dex (16.67s) Pre-Dex (28.54s) Before Dexing (5.04) Configuration (0.65)
55.
Install After Code Change
(33.31s) 2% 15% 50% 6% 27% Install (8.89s) After Dexing (2.06s) Dex (16.67s) Before Dexing (5.04s) Configuration (0.65s)
56.
PRE-DEXING DEXING
57.
Hint • Enable the
Gradle daemon and parallel build dexOptions { incremental true } • Incremental dexing ~/.gradle/gradle.properties org.gradle.daemon=true org.gradle.parallel=true org.gradle.jvmargs=-Xmx1024m org.gradle.java.home=/path/to/jvm • Offline Mode • Separate project into modules
58.
https://source.android.com/ source/jack.html Jack Compiler
59.
http://gradle.org/training/
60.
Anton Nurdin T Senior
Software Engineer, Xendit anton46.com THANK YOU
Download now