Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use AndroidX so applications can drop jetifier #244

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 14 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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"
}
}
Expand Down Expand Up @@ -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"
]
]
6 changes: 3 additions & 3 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<module name="Checker">
<!--module name="NewlineAtEndOfFile"/-->
<module name="FileLength"/>
<module name="LineLength">
<property name="max" value="120"/>
</module>
<module name="FileTabCharacter"/>
<module name="SuppressWarningsFilter" />

Expand Down Expand Up @@ -63,9 +66,6 @@

<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="LineLength">
<property name="max" value="120"/>
</module>
<module name="MethodLength">
<property name="max" value="200"/>
</module>
Expand Down
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=2.2.0
VERSION_NAME=2.2.1
GROUP=com.orhanobut

POM_DESCRIPTION=Simple, Pretty and Advanced Logger
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.os.Handler;
import android.os.Looper;
import android.os.Message;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion logger/src/main/java/com/orhanobut/logger/LogAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
defaultConfig {
applicationId "com.orhanobut.sample"
minSdkVersion 23
targetSdkVersion 27
targetSdkVersion rootProject.ext.compileSdkVersion
versionCode 1
versionName "1.0"

Expand Down