From affa116d5d27ecaf409de13a936f2b1eeb0e1f81 Mon Sep 17 00:00:00 2001 From: Jonathan Caryl Date: Mon, 3 Apr 2017 14:24:18 +0100 Subject: [PATCH] Extract common build versions into project root --- .gitignore | 3 +-- build.gradle | 13 +++++++++++-- demo/build.gradle | 10 +++++----- gradle/wrapper/gradle-wrapper.properties | 4 ++-- library/build.gradle | 10 +++++----- 5 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 39fb081..63cb77a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,7 @@ *.iml .gradle /local.properties -/.idea/workspace.xml -/.idea/libraries +.idea .DS_Store /build /captures diff --git a/build.gradle b/build.gradle index 7114aa0..ae601e4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,12 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.0.4' + ext.kotlin_version = '1.1.1' repositories { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.2.3' + classpath 'com.android.tools.build:gradle:2.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong @@ -21,6 +21,15 @@ allprojects { } +ext { + compileSdkVersion = 25 + buildToolsVersion = '25.0.2' + minSdkVersion = 16 + targetSdkVersion = compileSdkVersion + + supportLibVersion = '25.3.1' +} + task clean(type: Delete) { delete rootProject.buildDir } diff --git a/demo/build.gradle b/demo/build.gradle index dbc392a..c0b4f21 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 24 - buildToolsVersion '25.0.2' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { applicationId "com.yalantis.jellyanimation.demo" - minSdkVersion 16 - targetSdkVersion 24 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" @@ -31,6 +31,6 @@ android { dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') - compile 'com.android.support:appcompat-v7:24.2.1' + compile "com.android.support:appcompat-v7:$supportLibVersion" compile project(':library') } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 04e285f..34d1851 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Dec 28 10:00:20 PST 2015 +#Mon Apr 03 14:16:14 BST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip diff --git a/library/build.gradle b/library/build.gradle index f522951..f94e614 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -3,11 +3,11 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 24 - buildToolsVersion '25.0.2' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - minSdkVersion 16 - targetSdkVersion 24 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" } @@ -24,7 +24,7 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:24.2.1' + compile "com.android.support:appcompat-v7:$supportLibVersion" compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } repositories {