From 137fabee0e72e40ed6a8a7cc79ecd97f40ec3d4e Mon Sep 17 00:00:00 2001
From: Mauricio Colli <mauriciocolli@outlook.com>
Date: Sun, 28 Apr 2019 17:43:50 -0300
Subject: [PATCH] Update Gradle and introduce Kotlin

---
 app/build.gradle                         | 9 +++++++--
 build.gradle                             | 4 +++-
 gradle/wrapper/gradle-wrapper.properties | 3 +--
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/app/build.gradle b/app/build.gradle
index 792893b1b..5477a11a8 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,4 +1,7 @@
 apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+apply plugin: 'kotlin-kapt'
 
 android {
     compileSdkVersion 28
@@ -53,6 +56,8 @@ ext {
 }
 
 dependencies {
+    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+
     androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
         exclude module: 'support-annotations'
     })
@@ -92,10 +97,10 @@ dependencies {
 
     implementation "androidx.room:room-runtime:${roomDbLibVersion}"
     implementation "androidx.room:room-rxjava2:${roomDbLibVersion}"
-    annotationProcessor "androidx.room:room-compiler:${roomDbLibVersion}"
+    kapt "androidx.room:room-compiler:${roomDbLibVersion}"
 
     implementation "frankiesardo:icepick:${icepickLibVersion}"
-    annotationProcessor "frankiesardo:icepick-processor:${icepickLibVersion}"
+    kapt "frankiesardo:icepick-processor:${icepickLibVersion}"
 
     debugImplementation "com.squareup.leakcanary:leakcanary-android:${leakCanaryLibVersion}"
     releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryLibVersion}"
diff --git a/build.gradle b/build.gradle
index 60a85021a..5ceffb6e7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,12 +1,14 @@
 // Top-level build file where you can add configuration options common to all sub-projects/modules.
 
 buildscript {
+    ext.kotlin_version = '1.3.50'
     repositories {
         jcenter()
         google()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.4.0'
+        classpath 'com.android.tools.build:gradle:3.5.1'
+        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
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index e98d29bd8..d757f3d33 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Mon Oct 07 06:29:33 CEST 2019
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip