diff --git a/app/build.gradle b/app/build.gradle index 8e2e2b8..4df4642 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -40,7 +40,7 @@ defaultConfig { applicationId "nl.digital_me.dummyandroidapp" - minSdkVersion 14 + minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.compileSdkVersion versionCode project.hasProperty('versionCode') ? project.property('versionCode') as int : 71 versionName project.hasProperty('versionName') ? project.property('versionName') : "0.0.5" @@ -138,7 +138,7 @@ dependencies { //compile fileTree(dir: 'libs', include: ['*.jar']) - testImplementation "junit:junit:$rootProject.junitVersion" + testImplementation "junit:junit:$rootProject.ext.junitVersion" testImplementation "org.mockito:mockito-core:2.19.0" implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" implementation "com.android.support:design:${rootProject.ext.supportLibVersion}" diff --git a/build.gradle b/build.gradle index 4426c7f..f184424 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,29 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { + + ext { + // Sdk and tools + compileSdkVersion = 28 + minSdkVersion = 14 + targetSdkVersion = 28 + + // App dependencies + buildToolsVersion = "28.0.3" + supportLibVersion = "28.0.0" + junitVersion = '4.12' + gradleVersion = '3.2.0' + } + repositories { // For the Gradle plugin and its deps maven { url "https://maven.google.com" } jcenter() } + dependencies { // https://jcenter.bintray.com/com/android/tools/build/gradle - classpath 'com.android.tools.build:gradle:3.2.0' + classpath "com.android.tools.build:gradle:$gradleVersion" } } @@ -20,15 +35,6 @@ } } -//This block encapsulates custom properties and makes them available to all -//modules in the project. -ext { - compileSdkVersion = 28 - buildToolsVersion = "28.0.2" - supportLibVersion = "28.0.0" - junitVersion = '4.12' -} - task clean(type: Delete) { delete rootProject.buildDir }