From c83e6f2fd0262ae26b6c6d4e6f4b1d091c9c7d83 Mon Sep 17 00:00:00 2001 From: macgills Date: Tue, 30 Apr 2019 09:37:55 +0100 Subject: [PATCH] =?UTF-8?q?For=202.5:=20Proposal:=20Use=20Kotlin=20as=20th?= =?UTF-8?q?e=20primary=20development=20language=20for=E2=80=A6=20(#1167)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * For 2.5: Proposal: Use Kotlin as the primary development language for Kiwix #648 * Update mockito * apply 2 space indent --- app/build.gradle | 8 +++--- build.gradle | 32 ++++++++++++------------ gradle/wrapper/gradle-wrapper.properties | 4 +-- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index e9ffbc0e1..4b0f36a2b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,13 +8,14 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.1.0' classpath 'com.testdroid:gradle:1.5.0' classpath 'org.apache.httpcomponents:httpclient-android:4.3.3' } } apply plugin: 'com.android.application' +apply plugin: 'kotlin-android-extensions' +apply plugin: 'kotlin-android' apply plugin: 'checkstyle' apply plugin: 'testdroid' @@ -121,8 +122,8 @@ dependencies { androidTestImplementation 'junit:junit:4.12' // Mockito - testImplementation "org.mockito:mockito-core:2.7.22" - androidTestImplementation "org.mockito:mockito-android:2.7.22" + testImplementation "org.mockito:mockito-core:2.24.5" + androidTestImplementation "org.mockito:mockito-android:2.24.5" // Leak canary implementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' @@ -138,6 +139,7 @@ dependencies { } } } + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } // Set custom app import directory diff --git a/build.gradle b/build.gradle index 2707b85f6..12f9c8412 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,12 @@ - - buildscript { + ext.kotlin_version = '1.3.31' repositories { jcenter() - google() + google() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.0' + classpath 'com.android.tools.build:gradle:3.4.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -14,22 +14,22 @@ buildscript { } ext { - supportLibraryVersion = '27.0.2' - rxJavaVersion = '2.1.9' - rxAndroidVersion = '2.0.2' - okHttpVersion = '3.9.1' - retrofitVersion = '2.3.0' - javaxAnnotationVersion = '1.3.2' - daggerVersion = '2.15' + supportLibraryVersion = '27.0.2' + rxJavaVersion = '2.1.9' + rxAndroidVersion = '2.0.2' + okHttpVersion = '3.9.1' + retrofitVersion = '2.3.0' + javaxAnnotationVersion = '1.3.2' + daggerVersion = '2.15' } allprojects { - repositories { - jcenter() - google() - } + repositories { + jcenter() + google() + } } task clean(type: Delete) { - delete rootProject.buildDir + delete rootProject.buildDir } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8133477ea..c205fc7aa 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Mar 27 23:53:46 IST 2018 +#Wed Apr 24 09:03:54 BST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip