diff --git a/build.gradle b/build.gradle index 71f02b43..7a6af60b 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,13 @@ buildscript { - ext.kotlinVersion = '1.2.51' + ext.kotlinVersion = '1.4.10' + repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.2.0' + classpath 'com.android.tools.build:gradle:4.1.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" } } @@ -46,17 +48,18 @@ task clean(type: Delete) { ext { minSdkVersion = 8 - targetSdkVersion = 28 - compileSdkVersion = 28 - buildToolsVersion = '28.0.2' + targetSdkVersion = 29 + compileSdkVersion = 29 + buildToolsVersion = '30.0.2' + } ext.deps = [ junit : 'junit:junit:4.12', - truth : 'com.google.truth:truth:0.28', - robolectric : 'org.robolectric:robolectric:3.3', - mockito : "org.mockito:mockito-core:2.8.9", - json : "org.json:json:20160810", - supportAnnotations: 'androidx.annotation:annotation:1.0.0', + truth : 'com.google.truth:truth:1.1', + robolectric : 'org.robolectric:robolectric:3.8', + mockito : "org.mockito:mockito-core:2.28.2", + json : "org.json:json:20200518", + supportAnnotations: "androidx.annotation:annotation:1.1.0", kotlin : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" -] \ No newline at end of file +] diff --git a/checkstyle.xml b/checkstyle.xml index 93390382..3a31c202 100755 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -6,6 +6,9 @@ + + + @@ -63,9 +66,6 @@ - - - diff --git a/gradle.properties b/gradle.properties index 00ff8987..6d0f46f5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=2.2.0 +VERSION_NAME=2.2.1 GROUP=com.orhanobut POM_DESCRIPTION=Simple, Pretty and Advanced Logger @@ -11,5 +11,6 @@ POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt POM_LICENCE_DIST=repo POM_DEVELOPER_ID=nr4bt POM_DEVELOPER_NAME=Orhan Obut + + android.useAndroidX=true -android.enableJetifier=true \ No newline at end of file diff --git a/logger/src/main/java/com/orhanobut/logger/CsvFormatStrategy.java b/logger/src/main/java/com/orhanobut/logger/CsvFormatStrategy.java index a36a642d..e57d67af 100644 --- a/logger/src/main/java/com/orhanobut/logger/CsvFormatStrategy.java +++ b/logger/src/main/java/com/orhanobut/logger/CsvFormatStrategy.java @@ -52,7 +52,7 @@ private CsvFormatStrategy(@NonNull Builder builder) { StringBuilder builder = new StringBuilder(); // machine-readable date/time - builder.append(Long.toString(date.getTime())); + builder.append(date.getTime()); // human-readable date/time builder.append(SEPARATOR); diff --git a/logger/src/main/java/com/orhanobut/logger/DiskLogStrategy.java b/logger/src/main/java/com/orhanobut/logger/DiskLogStrategy.java index cee6171c..47e83efb 100644 --- a/logger/src/main/java/com/orhanobut/logger/DiskLogStrategy.java +++ b/logger/src/main/java/com/orhanobut/logger/DiskLogStrategy.java @@ -3,6 +3,7 @@ import android.os.Handler; import android.os.Looper; import android.os.Message; + import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -12,6 +13,7 @@ import static com.orhanobut.logger.Utils.checkNotNull; + /** * Abstract class that takes care of background threading the file log operation on Android. * implementing classes are free to directly perform I/O operations there. diff --git a/logger/src/main/java/com/orhanobut/logger/LogAdapter.java b/logger/src/main/java/com/orhanobut/logger/LogAdapter.java index effb42da..c5e3dc22 100644 --- a/logger/src/main/java/com/orhanobut/logger/LogAdapter.java +++ b/logger/src/main/java/com/orhanobut/logger/LogAdapter.java @@ -30,4 +30,4 @@ public interface LogAdapter { * @param message is the given message for the log message. */ void log(int priority, @Nullable String tag, @NonNull String message); -} \ No newline at end of file +} diff --git a/logger/src/main/java/com/orhanobut/logger/LogcatLogStrategy.java b/logger/src/main/java/com/orhanobut/logger/LogcatLogStrategy.java index 8e7ed62b..fa501916 100644 --- a/logger/src/main/java/com/orhanobut/logger/LogcatLogStrategy.java +++ b/logger/src/main/java/com/orhanobut/logger/LogcatLogStrategy.java @@ -1,8 +1,9 @@ package com.orhanobut.logger; +import android.util.Log; + import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import android.util.Log; import static com.orhanobut.logger.Utils.checkNotNull; diff --git a/sample/build.gradle b/sample/build.gradle index 1fc3f7bb..f507422e 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -7,7 +7,7 @@ android { defaultConfig { applicationId "com.orhanobut.sample" minSdkVersion 23 - targetSdkVersion 27 + targetSdkVersion rootProject.ext.compileSdkVersion versionCode 1 versionName "1.0"