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

feat!: upgrade to slf4j 2.0.7 #297

Merged
merged 17 commits into from
Mar 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 2.1
executors:
android:
docker:
- image: cimg/android:2022.09.2
- image: cimg/android:2023.02.1
working_directory: ~/code
environment:
JVM_OPTS: -Xmx3200m
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ Quick Start

```groovy
dependencies {
implementation 'org.slf4j:slf4j-api:1.7.36' // slf4j 2.x not yet supported
implementation 'com.github.tony19:logback-android:2.0.1'
implementation 'org.slf4j:slf4j-api:2.0.5'
implementation 'com.github.tony19:logback-android:3.0.0'
}
```

If using `logback-android` in unit tests, **either** [use Robolectric](https://github.com/tony19/logback-android/issues/151#issuecomment-466276739), **or** use this config instead:

```groovy
dependencies {
implementation 'org.slf4j:slf4j-api:1.7.36' // slf4j 2.x not yet supported
implementation 'com.github.tony19:logback-android:2.0.1'
implementation 'org.slf4j:slf4j-api:2.0.5'
implementation 'com.github.tony19:logback-android:3.0.0'
testImplementation 'ch.qos.logback:logback-classic:1.2.11'
}

Expand All @@ -41,8 +41,6 @@ Quick Start
}
```

**NOTE:** SLF4J 2.x is not [yet](https://github.com/tony19/logback-android/pull/247) supported.

3. Create `app/src/main/assets/logback.xml` containing:

```xml
Expand Down Expand Up @@ -95,8 +93,8 @@ _Gradle_ **release**

```groovy
dependencies {
implementation 'org.slf4j:slf4j-api:1.7.36' // slf4j 2.x not yet supported
implementation 'com.github.tony19:logback-android:2.0.1'
implementation 'org.slf4j:slf4j-api:2.0.5'
implementation 'com.github.tony19:logback-android:3.0.0'
}
```

Expand All @@ -108,8 +106,8 @@ repositories {
}

dependencies {
implementation 'org.slf4j:slf4j-api:1.7.36' // slf4j 2.x not yet supported
implementation 'com.github.tony19:logback-android:2.0.2-SNAPSHOT'
implementation 'org.slf4j:slf4j-api:2.0.5'
implementation 'com.github.tony19:logback-android:3.0.1-SNAPSHOT'
}
```

Expand All @@ -123,4 +121,6 @@ Use these commands to create the AAR:

The file is output to:

./build/logback-android-2.0.1-debug.aar
```sh
./build/logback-android-3.0.0-debug.aar
```
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

# `version` is needed by gradle-release-plugin and always matches
# `VERSION_NAME`. The plugin updates both automatically.
version=2.0.2-SNAPSHOT
VERSION_NAME=2.0.2-SNAPSHOT
version=3.0.1-SNAPSHOT
VERSION_NAME=3.0.1-SNAPSHOT
VERSION_CODE=3020000

slf4jVersion=1.7.36
slf4jVersion=2.0.7

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
Expand Down
6 changes: 3 additions & 3 deletions logback-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@ dependencies {
}

testImplementation 'org.hamcrest:hamcrest-junit:2.0.0.0'
testImplementation 'org.robolectric:robolectric:4.9'
testImplementation 'org.robolectric:robolectric:4.9.2'
testImplementation 'org.mockito:mockito-core:2.28.2'
testImplementation 'joda-time:joda-time:2.12.2'

// This dep is required when using Robolectric and targeting pre-21 SDKs.
// Otherwise, tests fail with java.lang.NoClassDefFoundError.
// https://github.com/robolectric/robolectric/issues/2562#issuecomment-263086503
testImplementation 'org.robolectric:android-all:13-robolectric-9030017'
testImplementation 'com.icegreen:greenmail:1.6.11'
testImplementation 'com.icegreen:greenmail:1.6.13'
testImplementation 'dom4j:dom4j:1.6.1'
testImplementation 'org.easytesting:fest-assert:1.4'
testImplementation "org.slf4j:integration:${slf4jVersion}"
testImplementation "org.slf4j:integration:2.0.0-alpha1" // don't seem to have any stable 2.x releases yet: https://mvnrepository.com/artifact/org.slf4j/integration
testImplementation "org.slf4j:log4j-over-slf4j:${slf4jVersion}"
testImplementation "org.slf4j:slf4j-api:${slf4jVersion}:tests"
testImplementation "org.slf4j:slf4j-ext:${slf4jVersion}"
Expand Down
Loading