From 222b0dfb2f73e9d12a903767f1b44cd835b20efe Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Sat, 27 Mar 2021 01:42:38 +0100 Subject: [PATCH 1/2] Update Kotlin and android dependences In order to start to update the application with the newest library this commit updates the dependences with the newest and also update the kotlin language to the last one (1.4.x family) that bring a couple of performance improvement. Signed-off-by: Vincenzo Palazzo --- app/build.gradle | 18 +++++++++--------- .../com/lvaccaro/lamp/views/PowerImageView.kt | 6 +++--- build.gradle | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9d2b8ade..4243e6d4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,19 +42,19 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'androidx.core:core-ktx:1.2.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' - implementation 'androidx.preference:preference:1.1.0' + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.core:core-ktx:1.3.2' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + implementation 'androidx.preference:preference-ktx:1.1.1' implementation 'org.tukaani:xz:1.8' - implementation 'org.apache.commons:commons-compress:1.19' + implementation 'org.apache.commons:commons-compress:1.20' implementation 'com.google.zxing:core:3.4.0' implementation 'me.dm7.barcodescanner:zxing:1.9.13' - implementation 'com.google.android.material:material:1.1.0' + implementation 'com.google.android.material:material:1.3.0' implementation "org.jetbrains.anko:anko-commons:0.10.4" implementation 'androidx.legacy:legacy-support-v4:1.0.0' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test:runner:1.3.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' } diff --git a/app/src/main/java/com/lvaccaro/lamp/views/PowerImageView.kt b/app/src/main/java/com/lvaccaro/lamp/views/PowerImageView.kt index 4edf0a8e..f8a35e7c 100644 --- a/app/src/main/java/com/lvaccaro/lamp/views/PowerImageView.kt +++ b/app/src/main/java/com/lvaccaro/lamp/views/PowerImageView.kt @@ -10,9 +10,9 @@ class PowerImageView: AppCompatImageView { private var light = false - constructor(context: Context?): super(context) - constructor(context: Context?, attrs: AttributeSet?): super(context, attrs) - constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) + constructor(context: Context?): super(context!!) + constructor(context: Context?, attrs: AttributeSet?): super(context!!, attrs) + constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context!!, attrs, defStyleAttr) fun on() { light = true diff --git a/build.gradle b/build.gradle index 9529748d..27f095a0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +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' + ext.kotlin_version = '1.4.31' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.1' + classpath 'com.android.tools.build:gradle:4.1.3' 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 From 6c4b09de11fef95d52dc993a5d92b6828d7a424e Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Thu, 10 Jun 2021 21:52:35 +0200 Subject: [PATCH 2/2] Migrate gradle plugin too Signed-off-by: Vincenzo Palazzo --- app/build.gradle | 4 ++-- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 4243e6d4..f92962da 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,8 +42,8 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'androidx.core:core-ktx:1.3.2' + implementation 'androidx.appcompat:appcompat:1.3.0' + implementation 'androidx.core:core-ktx:1.5.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.preference:preference-ktx:1.1.1' implementation 'org.tukaani:xz:1.8' diff --git a/build.gradle b/build.gradle index 27f095a0..276571ae 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:4.2.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 d3d9a302..cebb3f2e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip