SlideShare a Scribd company logo
Do you speak
Gradle?
+Damian Mee
@meeDamian
So, what’s gradle?
● It’s a build system
● Based on Groovy
● Extensible (plugins!)
● Introduced to Android with Android Studio
● No support for NDK (yet)
CHEERFUL OFFTOP
Developers in Belarus
can now publish
PAID APPS
to
Play Store
:-)
Variants
● Build Type (debug or release)
● Product Flavor (paid, free, whitelabel)
● Multi-APK Splits (ARM, x86, MIPS)
COMING SOON
Enough bla bla bla
ProjectHome
|-- app
| |-- src
| | |-- main
| | | +-- java
| | | +-- res
| | | |-- AndroidManifest.xml
| | |-- otherFlavor
| |-- build.gradle
|-- build.gradle
|-- gradle.properties
|-- settings.gradle
ProjectHome
|-- app
| |-- src
| | |-- main
| | | +-- java
| | | +-- res
| | | |-- AndroidManifest.xml
| | |
| | +-- otherFlavor
| |
| |-- build.gradle
|
|-- build.gradle
|-- gradle.properties
|-- settings.gradle
ProjectHome
|-- app
| |-- src
| | |-- main
| | | +-- java
| | | +-- res
| | | |-- AndroidManifest.xml
| | |
| | +-- otherFlavor
| |
| |-- build.gradle
|
|-- build.gradle
|-- gradle.properties
|-- settings.gradle
ProjectHome
|-- app
| |-- src
| | |-- main
| | | +-- java
| | | +-- res
| | | |-- AndroidManifest.xml
| | |
| | +-- otherFlavor
| |
| |-- build.gradle
|
|-- build.gradle
|-- gradle.properties
|-- settings.gradle
|-- settings.gradle
include ‘:app’
include ‘:app’, ‘:FloatingLabel’
|-- settings.gradle (with library projects)
ProjectHome
+-- app
+-- FloatingLabel
|
|-- build.gradle
|-- gradle.properties
|-- settings.gradle
ProjectHome
|-- app
| |-- src
| | |-- main
| | | +-- java
| | | +-- res
| | | |-- AndroidManifest.xml
| | |
| | +-- otherFlavor
| |
| |-- build.gradle
|
|-- build.gradle
|-- gradle.properties
|-- settings.gradle
ProjectHome
|-- app
| |-- src
| | |-- main
| | | +-- java
| | | +-- res
| | | |-- AndroidManifest.xml
| | |
| | +-- otherFlavor
| |
| |-- build.gradle
|
|-- build.gradle
|-- gradle.properties
|-- settings.gradle
|-- gradle.properties
STORE_FILE=/home/mee/dev/android/keys/datKey
STORE_PASSWORD=superSecretPassword
KEY_ALIAS=projecthome
KEY_PASSWORD=unbreakabalePassword
OUTPUT_DIR=/home/mee/dev/android/binaries/ProjectHome
PARSE_KEY_PUBLISHER=NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
ProjectHome
|-- app
| |-- src
| | |-- main
| | | +-- java
| | | +-- res
| | | |-- AndroidManifest.xml
| | |
| | +-- otherFlavor
| |
| |-- build.gradle
|
|-- build.gradle
|-- gradle.properties
|-- settings.gradle
ProjectHome
|-- app
| |-- src
| | |-- main
| | | +-- java
| | | +-- res
| | | |-- AndroidManifest.xml
| | |
| | +-- otherFlavor
| |
| |-- build.gradle
|
|-- build.gradle
|-- gradle.properties
|-- settings.gradle
ProjectHome
|-- app
| |-- src
| | |-- main
| | | +-- java
| | | +-- res
| | | |-- AndroidManifest.xml
| | |
| | +-- otherFlavor
| |
| |-- build.gradle
|
|-- build.gradle
|-- gradle.properties
|-- settings.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-L'
buildToolsVersion "20.0"
defaultConfig {
applicationId 'pl.d30.goodnotes'
minSdkVersion 15
targetSdkVersion 'L'
versionCode 1
versionName '1.0'
}
// ...
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-L'
buildToolsVersion "20.0"
defaultConfig {
applicationId 'pl.d30.goodnotes'
minSdkVersion 15
targetSdkVersion 'L'
versionCode 1
versionName '1.0'
}
// ...
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-L'
buildToolsVersion "20.0"
defaultConfig {
applicationId 'com.meedamian.projecthome'
minSdkVersion 15
targetSdkVersion 'L'
versionCode 1
versionName '1.0'
}
// ...
// ...
buildTypes {
release {
// here’s where signing code would go
}
}
productFlavors {
otherFlavor {
// flavor-specific configuration, ex:
buildConfigField "String", "PARSE_KEY", PARSE_KEY_PUBLISHER
}
}
}
// ...
// ...
buildTypes {
release {
// here’s where signing code would go
}
}
productFlavors {
otherFlavor {
// flavor-specific configuration, ex:
buildConfigField "String", "PARSE_KEY", PARSE_KEY_PUBLISHER
}
}
}
// ...
Shameless auto-promotion
meeDamian.com/post/publishing-with-gradle
goo.gl/zmlS10
// ...
buildTypes {
release {
// here’s where signing code would go
}
}
productFlavors {
otherFlavor {
// flavor-specific configuration, ex:
buildConfigField "String", "PARSE_KEY", PARSE_KEY_PUBLISHER
}
}
}
// ...
// ...
buildTypes {
release {
// here’s where signing code would go
}
}
productFlavors {
otherFlavor {
// flavor-specific configuration, ex:
buildConfigField "String", "PARSE_KEY", PARSE_KEY_PUBLISHER
}
}
}
// ...
// ...
buildTypes {
release {
// here’s where signing code would go
}
}
productFlavors {
otherFlavor {
// flavor-specific configuration, ex:
buildConfigField "String", "PARSE_KEY", PARSE_KEY_PUBLISHER
}
}
}
// ...
BuildConfig.PARSE_KEY
// ...
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:17.0.0'
compile project(":FloatingLabel")
compile files("libs/libraryName.jar")
}
// ...
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:17.0.0'
compile project(":FloatingLabel")
compile files("libs/libraryName.jar")
}
// ...
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:17.0.0'
compile project(":FloatingLabel")
compile files("libs/libraryName.jar")
}
gradleplease.appspot.com
// ...
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:17.0.0'
compile project(":FloatingLabel")
compile files("libs/libraryName.jar")
}
// ...
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:17.0.0'
compile project(":FloatingLabel")
compile files("libs/libraryName.jar")
}
Android Gradle plugin docs SUCK ;-(
But community rocks ;)
+Android Developer Tools
goo.gl/6a0aKP
+Tor Norbye
+Alex Ruiz
[gradle]
Fin and Q&A
or
...
Fin and Q&A
or
Material Design
A little bit about
Material Design
● “paper” and “ink” based design language
● introduced with Android L-something
● cross-everything (mobile, desktop, wear, etc)
● adds depth through shadows
● beautifully crafted (unlike this ugly presentation)
Leave teleportation for Star Trek
Keep things delightful
Structure information
Loads of beautifully crafted icons
Depth helps with comprehension
Interaction emits energy
google.com/design
Kick start
<style name="Theme.Awesome"
parent="@android:style/Theme.Material.Light.DarkActionBar">
</style>
values-v21/styles.xml
defaultConfig {
targetSdkVersion 'L'
}
app/build.gradle
Remarks
● CardView and RecyclerView
● android:colorPrimary, android:colorAccent
● android:tintMode=””
Android Studio 0.8.1
Is now in Beta
New project structure view (soon)
API levels in wizard
Layout Editor (menu)
Layout Editor (different versions)
Typechecking to the resource system
Non-retarded emulators!
genymotion.com
Other, usual & gradual improvements
● Wear, TV & Glass now in wizard
● RTL layouts improvements
● Eclipse migrate process
● etc...
+Damian Mee
@meeDamian
meeDamian.com/post/publishing-with-gradle
goo.gl/zmlS10

More Related Content

What's hot

Dependency management in Magento with Composer
Dependency management in Magento with ComposerDependency management in Magento with Composer
Dependency management in Magento with Composer
Manuele Menozzi
 
Best Practice Site Architecture in Drupal 8
Best Practice Site Architecture in Drupal 8Best Practice Site Architecture in Drupal 8
Best Practice Site Architecture in Drupal 8
Pantheon
 
Doing more with LESS
Doing more with LESSDoing more with LESS
Doing more with LESS
jsmith92
 
Vagrant WordCamp Hamilton
Vagrant  WordCamp HamiltonVagrant  WordCamp Hamilton
Vagrant WordCamp Hamilton
Paul Bearne
 
Write your first WordPress plugin
Write your first WordPress pluginWrite your first WordPress plugin
Write your first WordPress plugin
Anthony Montalbano
 
Development Workflow Tools for Open-Source PHP Libraries
Development Workflow Tools for Open-Source PHP LibrariesDevelopment Workflow Tools for Open-Source PHP Libraries
Development Workflow Tools for Open-Source PHP Libraries
Pantheon
 
Modern Perl Web Development with Dancer
Modern Perl Web Development with DancerModern Perl Web Development with Dancer
Modern Perl Web Development with Dancer
Dave Cross
 
WordPress mit Composer und Git verwalten
WordPress mit Composer und Git verwaltenWordPress mit Composer und Git verwalten
WordPress mit Composer und Git verwalten
Walter Ebert
 
How to create a joomla component from scratch
How to create a joomla component from scratchHow to create a joomla component from scratch
How to create a joomla component from scratch
Tim Plummer
 
Php 7 evolution
Php 7 evolutionPhp 7 evolution
Php 7 evolution
Félix Gómez López
 
Extending eZ Platform v2 with Symfony and React
Extending eZ Platform v2 with Symfony and ReactExtending eZ Platform v2 with Symfony and React
Extending eZ Platform v2 with Symfony and React
eZ Systems
 
WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015
Fernando Daciuk
 
How to Issue and Activate Free SSL using Let's Encrypt
How to Issue and Activate Free SSL using Let's EncryptHow to Issue and Activate Free SSL using Let's Encrypt
How to Issue and Activate Free SSL using Let's Encrypt
Mayeenul Islam
 
Caching in a multilanguage environment
Caching in a multilanguage environmentCaching in a multilanguage environment
Caching in a multilanguage environment
elliando dias
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practices
markparolisi
 
New EEA Plone Add-ons
New EEA Plone Add-onsNew EEA Plone Add-ons
New EEA Plone Add-ons
Alin Voinea
 
Nahlédněte za oponu VersionPressu
Nahlédněte za oponu VersionPressuNahlédněte za oponu VersionPressu
Nahlédněte za oponu VersionPressu
Jan Voracek
 
Create your own composer package
Create your own composer packageCreate your own composer package
Create your own composer package
Lattapon Yodsuwan
 
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHPBuilding com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
iMasters
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
Dylan Jay
 

What's hot (20)

Dependency management in Magento with Composer
Dependency management in Magento with ComposerDependency management in Magento with Composer
Dependency management in Magento with Composer
 
Best Practice Site Architecture in Drupal 8
Best Practice Site Architecture in Drupal 8Best Practice Site Architecture in Drupal 8
Best Practice Site Architecture in Drupal 8
 
Doing more with LESS
Doing more with LESSDoing more with LESS
Doing more with LESS
 
Vagrant WordCamp Hamilton
Vagrant  WordCamp HamiltonVagrant  WordCamp Hamilton
Vagrant WordCamp Hamilton
 
Write your first WordPress plugin
Write your first WordPress pluginWrite your first WordPress plugin
Write your first WordPress plugin
 
Development Workflow Tools for Open-Source PHP Libraries
Development Workflow Tools for Open-Source PHP LibrariesDevelopment Workflow Tools for Open-Source PHP Libraries
Development Workflow Tools for Open-Source PHP Libraries
 
Modern Perl Web Development with Dancer
Modern Perl Web Development with DancerModern Perl Web Development with Dancer
Modern Perl Web Development with Dancer
 
WordPress mit Composer und Git verwalten
WordPress mit Composer und Git verwaltenWordPress mit Composer und Git verwalten
WordPress mit Composer und Git verwalten
 
How to create a joomla component from scratch
How to create a joomla component from scratchHow to create a joomla component from scratch
How to create a joomla component from scratch
 
Php 7 evolution
Php 7 evolutionPhp 7 evolution
Php 7 evolution
 
Extending eZ Platform v2 with Symfony and React
Extending eZ Platform v2 with Symfony and ReactExtending eZ Platform v2 with Symfony and React
Extending eZ Platform v2 with Symfony and React
 
WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015
 
How to Issue and Activate Free SSL using Let's Encrypt
How to Issue and Activate Free SSL using Let's EncryptHow to Issue and Activate Free SSL using Let's Encrypt
How to Issue and Activate Free SSL using Let's Encrypt
 
Caching in a multilanguage environment
Caching in a multilanguage environmentCaching in a multilanguage environment
Caching in a multilanguage environment
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practices
 
New EEA Plone Add-ons
New EEA Plone Add-onsNew EEA Plone Add-ons
New EEA Plone Add-ons
 
Nahlédněte za oponu VersionPressu
Nahlédněte za oponu VersionPressuNahlédněte za oponu VersionPressu
Nahlédněte za oponu VersionPressu
 
Create your own composer package
Create your own composer packageCreate your own composer package
Create your own composer package
 
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHPBuilding com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
 

Similar to Gradle + Google I/O 2014 remarks

[DEPRECATED]Gradle the android
[DEPRECATED]Gradle the android[DEPRECATED]Gradle the android
[DEPRECATED]Gradle the android
Jun Liu
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
mfrancis
 
Anatomy of a Gradle plugin
Anatomy of a Gradle pluginAnatomy of a Gradle plugin
Anatomy of a Gradle plugin
Dmytro Zaitsev
 
What makes me "Grunt"?
What makes me "Grunt"? What makes me "Grunt"?
What makes me "Grunt"?
Fabien Doiron
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
Bo-Yi Wu
 
Gradle: The Build system you have been waiting for
Gradle: The Build system you have been waiting forGradle: The Build system you have been waiting for
Gradle: The Build system you have been waiting for
Corneil du Plessis
 
Lightweight Developer Provisioning with Gradle
Lightweight Developer Provisioning with GradleLightweight Developer Provisioning with Gradle
Lightweight Developer Provisioning with Gradle
QAware GmbH
 
Lightweight Developer Provisioning with Gradle and SEU-as-code
Lightweight Developer Provisioning with Gradle and SEU-as-codeLightweight Developer Provisioning with Gradle and SEU-as-code
Lightweight Developer Provisioning with Gradle and SEU-as-code
Mario-Leander Reimer
 
Custom deployments with sbt-native-packager
Custom deployments with sbt-native-packagerCustom deployments with sbt-native-packager
Custom deployments with sbt-native-packager
GaryCoady
 
Single Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle StorySingle Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle Story
Kon Soulianidis
 
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
tobiaspreuss
 
Introducing RaveJS: Spring Boot concepts for JavaScript applications
Introducing RaveJS: Spring Boot concepts for JavaScript applicationsIntroducing RaveJS: Spring Boot concepts for JavaScript applications
Introducing RaveJS: Spring Boot concepts for JavaScript applications
John Hann
 
DevFest 2022 - GitHub Actions를 활용한 Flutter 배포 자동화하기
DevFest 2022 - GitHub Actions를 활용한 Flutter 배포 자동화하기DevFest 2022 - GitHub Actions를 활용한 Flutter 배포 자동화하기
DevFest 2022 - GitHub Actions를 활용한 Flutter 배포 자동화하기
SuJang Yang
 
Redmine Betabeers SVQ
Redmine Betabeers SVQRedmine Betabeers SVQ
Redmine Betabeers SVQ
Ildefonso Montero
 
Using Composer with Drupal and Drush
Using Composer with Drupal and DrushUsing Composer with Drupal and Drush
Using Composer with Drupal and Drush
Pantheon
 
Config BuildConfig
Config BuildConfigConfig BuildConfig
Config BuildConfig
Vijay Shukla
 
Introduction to CMake
Introduction to CMakeIntroduction to CMake
Introduction to CMake
Dimitrios Platis
 
Config BuildConfig
Config BuildConfigConfig BuildConfig
Config BuildConfig
NexThoughts Technologies
 
Config/BuildConfig
Config/BuildConfigConfig/BuildConfig
Config/BuildConfig
Vijay Shukla
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
biicode
 

Similar to Gradle + Google I/O 2014 remarks (20)

[DEPRECATED]Gradle the android
[DEPRECATED]Gradle the android[DEPRECATED]Gradle the android
[DEPRECATED]Gradle the android
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
Anatomy of a Gradle plugin
Anatomy of a Gradle pluginAnatomy of a Gradle plugin
Anatomy of a Gradle plugin
 
What makes me "Grunt"?
What makes me "Grunt"? What makes me "Grunt"?
What makes me "Grunt"?
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
 
Gradle: The Build system you have been waiting for
Gradle: The Build system you have been waiting forGradle: The Build system you have been waiting for
Gradle: The Build system you have been waiting for
 
Lightweight Developer Provisioning with Gradle
Lightweight Developer Provisioning with GradleLightweight Developer Provisioning with Gradle
Lightweight Developer Provisioning with Gradle
 
Lightweight Developer Provisioning with Gradle and SEU-as-code
Lightweight Developer Provisioning with Gradle and SEU-as-codeLightweight Developer Provisioning with Gradle and SEU-as-code
Lightweight Developer Provisioning with Gradle and SEU-as-code
 
Custom deployments with sbt-native-packager
Custom deployments with sbt-native-packagerCustom deployments with sbt-native-packager
Custom deployments with sbt-native-packager
 
Single Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle StorySingle Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle Story
 
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
 
Introducing RaveJS: Spring Boot concepts for JavaScript applications
Introducing RaveJS: Spring Boot concepts for JavaScript applicationsIntroducing RaveJS: Spring Boot concepts for JavaScript applications
Introducing RaveJS: Spring Boot concepts for JavaScript applications
 
DevFest 2022 - GitHub Actions를 활용한 Flutter 배포 자동화하기
DevFest 2022 - GitHub Actions를 활용한 Flutter 배포 자동화하기DevFest 2022 - GitHub Actions를 활용한 Flutter 배포 자동화하기
DevFest 2022 - GitHub Actions를 활용한 Flutter 배포 자동화하기
 
Redmine Betabeers SVQ
Redmine Betabeers SVQRedmine Betabeers SVQ
Redmine Betabeers SVQ
 
Using Composer with Drupal and Drush
Using Composer with Drupal and DrushUsing Composer with Drupal and Drush
Using Composer with Drupal and Drush
 
Config BuildConfig
Config BuildConfigConfig BuildConfig
Config BuildConfig
 
Introduction to CMake
Introduction to CMakeIntroduction to CMake
Introduction to CMake
 
Config BuildConfig
Config BuildConfigConfig BuildConfig
Config BuildConfig
 
Config/BuildConfig
Config/BuildConfigConfig/BuildConfig
Config/BuildConfig
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 

Gradle + Google I/O 2014 remarks

Editor's Notes

  1. Collision, speedrun,
  2. Can run on IDE, as well as on Build Server; New version of Android Studio (Beta, 0.8.1); Groovy is like Java; We can plug-in(to) any stage of a build process through tooling APIs
  3. different sign
  4. Move stuff Manifest -> gradle
  5. Move stuff Manifest ->
  6. consists of properties that are automatically parsed and provided in our build.gradle files
  7. Move stuff Manifest ->
  8. topmost build.gradle file; it’s boring, provided by IDE/AS;
  9. A lot of things happen in this file
  10. since 0.8.0 there’s new plugin’s naming nomenclature
  11. no need to repeat the same stuff across different manifests
  12. where you’d put your signing
  13. optional (even when we’re using flavors) BuildConfig available as static variables in BuildConfig object
  14. split it into multiple slides with animated examples: Buttons, progress bars, paper layouts, 8dp grid, improved animation curves, webM -> gif: https://cloudconvert.org/webm-to-gif google.com/design/spec developer’s approch: https://www.youtube.com/watch?v=x5-ntYM_2UY http://developer.android.com/preview/material/get-started.html
  15. It takes time for users to find around in a new view
  16. Let’s just ignore support library altogether for now
  17. colorPrimary, colorAccent, tintMode (generic icons transformed to requested color)