Building the Android project with Gradle

We created the application with one simple activity and now we will try to build the application with Gradle. Android Studio has automatically generated two build files for the project; one build.gradle file in the root folder of the project and other build file in the app directory. We will use the build.gradle file of the subproject (app folder) to build the Android application. This build.gradle file has the following content:

apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { applicationId "ch10.androidsampleapp" minSdkVersion 15 targetSdkVersion 22 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles ...

Get Mastering Gradle now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.