Skip to content

Commit

Permalink
Merge pull request #247 from compscidr/slf4f-2.0.3
Browse files Browse the repository at this point in the history
feat!: upgrade slf4j to 2.0.3
  • Loading branch information
tony19 authored Dec 4, 2022
2 parents f09aeb6 + 618fa33 commit f7be379
Show file tree
Hide file tree
Showing 34 changed files with 524 additions and 170 deletions.
18 changes: 8 additions & 10 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:' // slf4j 2.x not yet supported
implementation 'com.github.tony19:logback-android:2.0.2-SNAPSHOT'
implementation 'org.slf4j:slf4j-api:2.0.3'
implementation 'com.github.tony19:logback-android:2.0.1'
}
```

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:' // slf4j 2.x not yet supported
implementation 'com.github.tony19:logback-android:2.0.2-SNAPSHOT'
implementation 'org.slf4j:slf4j-api:2.0.3'
implementation 'com.github.tony19:logback-android:2.0.1'
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:' // slf4j 2.x not yet supported
implementation 'com.github.tony19:logback-android:2.0.2-SNAPSHOT'
implementation 'org.slf4j:slf4j-api:2.0.3'
implementation 'com.github.tony19:logback-android:2.0.1'
}
```

Expand All @@ -108,7 +106,7 @@ repositories {
}
dependencies {
implementation 'org.slf4j:slf4j-api:' // slf4j 2.x not yet supported
implementation 'org.slf4j:slf4j-api:2.0.3'
implementation 'com.github.tony19:logback-android:2.0.2-SNAPSHOT'
}
```
Expand All @@ -121,5 +119,5 @@ Use these commands to create the AAR:
cd logback-android
scripts/makejar.sh

The file is output to: `./build/logback-android-2.0.0-debug.aar`
The file is output to: `./build/logback-android-2.0.1-debug.aar`

2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ version=2.0.2-SNAPSHOT
VERSION_NAME=2.0.2-SNAPSHOT
VERSION_CODE=3020000

slf4jVersion=2.0.3

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Ensure important default jvmargs aren't overwritten. See https://github.com/gradle/gradle/issues/19750
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 f7be379

Please sign in to comment.