Skip to content

Commit

Permalink
feat!: upgrade to slf4j 2.0.5
Browse files Browse the repository at this point in the history
related #247
  • Loading branch information
tony19 committed Dec 4, 2022
1 parent ca54e1b commit a7bc9ae
Show file tree
Hide file tree
Showing 34 changed files with 526 additions and 174 deletions.
20 changes: 9 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,4 @@ Use these commands to create the AAR:

The file is output to:

./build/logback-android-2.0.1-debug.aar
./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.5

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
Expand Down
2 changes: 1 addition & 1 deletion logback-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dependencies {
testImplementation 'com.icegreen:greenmail:1.6.11'
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

0 comments on commit a7bc9ae

Please sign in to comment.