Monday, March 30, 2015

Gradle tip - Set names to your modules

Set names to your modules/sub-projects. The name for your module/sub-project will be defined according to the filesystem directory it's in. You can change naming for better readability later on, using:
include ':SDK'
project(':SDK').projectDir = new File('MySdkProjectDirectory/')


Tuesday, March 10, 2015

Gradle tip - Leverage a top-level build.gradle

Usually a project contains more than one sub project or module. In that case you will want to have common settings that will be shared among them, saving you the trouble of rewriting them or maintaining future changes. A common setting will be the Android's buildscript dependency - classpath 'com.android.tools.build:gradle:x.y.z'


Thursday, February 19, 2015

Gradle tip - Always use a gradle wrapper

The wrapper sits in your project and defines a common build behaviour for all your team and CI tools. 

Why not use a local gradle installation? 
A. You will find yourself out-of-sync with other team members
B. You won't be able to run your project without pre-installing stuff (bad for CI implementations)
C. Your project build behaviour won't be tracked in git, which will cause problems going back to old revisions.

A gradle wrapper version is set in gradle-wrapper.properties - Only thing that needs to change in a gradle wrapper is the distributionUrl. It marks which gradle version should be used.

Monday, February 2, 2015

Gradle tip - What is gradle anyway?

Gradle is a build system. Android, along with the Android Studio, uses Gradle as its main build system, and adding functionality through an Android plugin. 
If you developed in the Eclipse days, than you would be familiar with Eclipse as your main build system. If you come from Web development background, than Gradle is your Grunt.

Gradle is based on the Groovy language, allowing us to write rich, scalable, scripts.



Gradle will be automatically ran with your Android Studio builds, but it can also be accessible via the command line/terminal, allowing you to integrate it easily with your CI. 

Saturday, January 31, 2015

Productive Team Work With Android Designs

This post discusses the best practices to work with Android designs/graphics, and aims mostly to the process part in which all parties should work in order to achieve productive communication, save time and get to the best pixel-perfect results.

Sunday, October 19, 2014

Android L (API 21) - java.lang.IllegalArgumentException: Service Intent must be explicit

Android new version - "Lollipop" (API 21) brings quite a few changes with it, but it comes with some price if you wish to target your app to that API.

When we started adapting our apps to the new API, one of the first problems we've encountered is the `IllegalArgumentException: Service Intent must be explicit`