From a0ee5403cefcf3afa0e8d47b85f1490390af0e4f Mon Sep 17 00:00:00 2001 From: IgorGanapolsky Date: Mon, 27 Apr 2015 13:24:05 -0400 Subject: [PATCH] Fix gradle setup. Add common ext block in build.gradle. Update android version. --- build.gradle | 19 +++++++++++++------ example/build.gradle | 14 +++++++------- library/build.gradle | 5 +++-- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index 38a094c..8295e52 100644 --- a/build.gradle +++ b/build.gradle @@ -3,14 +3,21 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:1.0.0' + classpath 'com.android.tools.build:gradle:1.1.3' } } +// To avoid manually setting the same values in all Android modules, set the value on the root +// project and then reference this from the modules +ext { + compileSdkVersion = 22 + buildToolsVersion = "22.0.1" +} + allprojects { - group = 'com.wrapp.floatlabelededittext' + group = 'com.wrapp.floatlabelededittext' - repositories { - mavenCentral() - } -} + repositories { + mavenCentral() + } +} \ No newline at end of file diff --git a/example/build.gradle b/example/build.gradle index 4faca43..a449db1 100644 --- a/example/build.gradle +++ b/example/build.gradle @@ -1,12 +1,12 @@ -apply plugin: 'android' +apply plugin: 'com.android.application' android { - compileSdkVersion 19 - buildToolsVersion '19.1.0' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { minSdkVersion 7 - targetSdkVersion 19 + targetSdkVersion 22 versionCode 1 versionName "1.0" } @@ -19,8 +19,8 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:19.+' + compile fileTree(include: ['*.jar'], dir: 'libs') //compile 'com.wrapp.floatlabelededittext:library:0.0.6' - compile project(":library") + compile project(':library') + compile 'com.android.support:appcompat-v7:22.1.1' } diff --git a/library/build.gradle b/library/build.gradle index a1f175d..c25e6d4 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -5,8 +5,9 @@ dependencies { } android { - compileSdkVersion 19 - buildToolsVersion '19.1.0' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion + defaultConfig { versionCode 6