diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e0c096184..460f1326a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -43,5 +43,5 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: site FOLDER: timber/build/dokka/html/ - TARGET_FOLDER: docs/4.x/ + TARGET_FOLDER: docs/5.x/ CLEAN: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 89cd82e90..f67be0446 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,28 +1,45 @@ -Change Log -========== +# Change log -Version 4.7.1 *(2018-06-28)* ----------------------------- +## [Unreleased] + + +## [5.0.0] - 2021-08-10 + +The library has been rewritten in Kotlin, but it remains binary-compatible with 4.x. +The intent is to support Kotlin multiplatform in the future. +This is otherwise a relatively minor, bug-fix release. + +### Changed + +- Minimum supported API level is now 14. +- Minimum supported AGP (for embedded lint checks) is now 7.0. + +### Fixed + +- `DebugTree` now finds first non-library class name which prevents exceptions in optimized builds where expected stackframes may have been inlined. +- Enforce 23-character truncated tag length until API 26 per AOSP sources. +- Support `Long` type for date/time format arguments when validating format strings in lint checks. +- Do not report string literal concatenation in lint checks on log message. + + +## [4.7.1] - 2018-06-28 * Fix: Redundant argument lint check now works correctly on Kotlin sources. -Version 4.7.0 *(2018-03-27)* ----------------------------- +## [4.7.0] - 2018-03-27 * Fix: Support lint version 26.1.0. * Fix: Check single-argument log method in TimberExceptionLogging. -Version 4.6.1 *(2018-02-12)* ----------------------------- +## [4.6.1] - 2018-02-12 * Fix: Lint checks now handle more edge cases around exception and message source. * Fix: Useless `BuildConfig` class is no longer included. -Version 4.6.0 *(2017-10-30)* ----------------------------- +## [4.6.0] - 2017-10-30 * New: Lint checks have been ported to UAST, their stability improved, and quick-fix suggestions added. They require Android Gradle Plugin 3.0 or newer to run. * New: Added nullability annotations for Kotlin users. @@ -30,14 +47,12 @@ Version 4.6.0 *(2017-10-30)* * Fix: Handle when a `null` array is supplied for the message arguments. This can occur when using various bytecode optimization tools. -Version 4.5.1 *(2017-01-20)* ----------------------------- +## [4.5.1] - 2017-01-20 * Fix: String formatting lint check now correctly works with dates. -Version 4.5.0 *(2017-01-09)* ----------------------------- +## [4.5.0] - 2017-01-09 * New: Automatically truncate class name tags to Android's limit of 23 characters. * New: Lint check for detecting null/empty messages or using the exception message when logging an @@ -45,27 +60,23 @@ Version 4.5.0 *(2017-01-09)* * Fix: Correct NPE in lint check when using String.format. -Version 4.4.0 *(2016-12-06)* ----------------------------- +## [4.4.0] - 2016-12-06 * New: `Tree.formatMessage` method allows customization of message formatting and rendering. * New: Lint checks ported to new IntelliJ PSI infrastructure. -Version 4.3.1 *(2016-09-19)* ----------------------------- +## [4.3.1] - 2016-09-19 * New: Add `isLoggable` convenience method which also provides the tag. -Version 4.3.0 *(2016-08-18)* ----------------------------- +## [4.3.0] - 2016-08-18 * New: Overloads for all log methods which accept only a `Throwable` without a message. -Version 4.2.0 *(2016-08-12)* ----------------------------- +## [4.2.0] - 2016-08-12 * New: `Timber.plant` now has a varargs overload for planting multiple trees at once. * New: minSdkVersion is now 9 because reasons. @@ -73,21 +84,18 @@ Version 4.2.0 *(2016-08-12)* * Fix: Allow lint checks to run when `Timber.tag(..).v(..)`-style logging is used. -Version 4.1.2 *(2016-03-30)* ----------------------------- +## [4.1.2] - 2016-03-30 * Fix: Tag-length lint check now only triggers on calls to `Timber`'s `tag` method. Previously it would match _any_ `tag` method and flag arguments longer than 23 characters. -Version 4.1.1 *(2016-02-19)* ----------------------------- +## [4.1.1] - 2016-02-19 * New: Add method for retreiving the number of installed trees. -Version 4.1.0 *(2015-10-19)* ----------------------------- +## [4.1.0] - 2015-10-19 * New: Consumer ProGuard rule automatically suppresses a warning for the use `@NonNls` on the 'message' argument for logging method. The warning was only for users running ProGuard and can safely be ignored. @@ -98,15 +106,13 @@ Version 4.1.0 *(2015-10-19)* * Fix: 'BinaryOperationInTimber' lint rule now only triggers for string concatenation. -Version 4.0.1 *(2015-10-07)* ----------------------------- +## [4.0.1] - 2015-10-07 * Fix: TimberArgTypes lint rule now allows booleans and numbers in '%s' format markers. * Fix: Lint rules now support running on Java 7 VMs. -Version 4.0.0 *(2015-10-07)* ----------------------------- +## [4.0.0] - 2015-10-07 * New: Library is now an .aar! This means the lint rules are automatically applied to consuming projects. @@ -114,29 +120,25 @@ Version 4.0.0 *(2015-10-07)* * Fix: Ensure thread safety when logging and adding or removing trees concurrently. -Version 3.1.0 *(2015-05-11)* ----------------------------- +## [3.1.0] - 2015-05-11 * New: `Tree.isLoggable` method allows a tree to determine whether a statement should be logged based on its priority. Defaults to logging all levels. -Version 3.0.2 *(2015-05-01)* ----------------------------- +## [3.0.2] - 2015-05-01 * Fix: Strip multiple anonymous class markers (e.g., `$1$2`) from class names when `DebugTree` is creating an inferred tag. -Version 3.0.1 *(2015-04-17)* ----------------------------- +## [3.0.1] - 2015-04-17 * Fix: String formatting is now always applied when arguments are present. Previously it would only trigger when an exception was included. -Version 3.0.0 *(2015-04-16)* ----------------------------- +## [3.0.0] - 2015-04-16 * New: `Tree` and `DebugTree` APIs are much more extensible requiring only a single method to override. @@ -149,105 +151,130 @@ Version 3.0.0 *(2015-04-16)* * Fix: Multiple planted `DebugTree`s now each correctly received tags set from a call to `tag`. -Version 2.7.1 *(2015-02-17)* ----------------------------- +## [2.7.1] - 2015-02-17 * Fix: Switch method of getting calling class to be consistent across API levels. -Version 2.7.0 *(2015-02-17)* ----------------------------- +## [2.7.0] - 2015-02-17 * New: `DebugTree` subclasses can now override `logMessage` for access to the priority, tag, and entire message for every log. * Fix: Prevent overriding `Tree` and `TaggedTree` methods on `DebugTree`. -Version 2.6.0 *(2015-02-17)* ----------------------------- +## [2.6.0] - 2015-02-17 * New: `DebugTree` subclasses can now override `createTag()` to specify log tags. `nextTag()` is also accessible for querying if an explicit tag was set. -Version 2.5.1 *(2015-01-19)* ----------------------------- +## [2.5.1] - 2015-01-19 * Fix: Properly split lines which contain both newlines and are over 4000 characters. * Explicitly forbid `null` tree instances. -Version 2.5.0 *(2014-11-08)* ----------------------------- +## [2.5.0] - 2014-11-08 * New: `Timber.asTree()` exposes functionality as a `Tree` instance rather than static methods. -Version 2.4.2 *(2014-11-07)* ----------------------------- +## [2.4.2] - 2014-11-07 * Eliminate heap allocation when dispatching log calls. -Version 2.4.1 *(2014-06-19)* ----------------------------- +## [2.4.1] - 2014-06-19 * Fix: Calls with no message but a `Throwable` are now correctly logged. -Version 2.4.0 *(2014-06-10)* ----------------------------- +## [2.4.0] - 2014-06-10 * New: `uproot` and `uprootAll` methods allow removing trees. -Version 2.3.0 *(2014-05-21)* ----------------------------- +## [2.3.0] - 2014-05-21 * New: Messages longer than 4000 characters will be split into multiple lines. -Version 2.2.2 *(2014-02-12)* ----------------------------- +## [2.2.2] - 2014-02-12 * Fix: Include debug level in previous fix which avoids formatting messages with no arguments. -Version 2.2.1 *(2014-02-11)* ----------------------------- +## [2.2.1] - 2014-02-11 * Fix: Do not attempt to format log messages which do not have arguments. -Version 2.2.0 *(2014-02-02)* ----------------------------- +## [2.2.0] - 2014-02-02 * New: verbose log level added (`v()`). * New: `timber-lint` module adds lint check to ensure you are calling `Timber` and not `Log`. * Fix: Specifying custom tags is now thread-safe. -Version 2.1.0 *(2013-11-21)* ----------------------------- +## [2.1.0] - 2013-11-21 * New: `tag` method allows specifying custom one-time tag. Redux! -Version 2.0.0 *(2013-10-21)* ----------------------------- +## [2.0.0] - 2013-10-21 * Logging API is now exposed as static methods on `Timber`. Behavior is added by installing `Tree` instances for logging. -Version 1.1.0 *(2013-07-22)* ----------------------------- +## [1.1.0] - 2013-07-22 * New: `tag` method allows specifying custom one-time tag. * Fix: Exception-containing methods now log at the correct level. -Version 1.0.0 *(2013-07-17)* ----------------------------- +## [1.0.0] - 2013-07-17 Initial cut. (Get it?) + + + + +[Unreleased]: https://github.com/JakeWharton/timber/compare/5.0.0...HEAD +[5.0.0]: https://github.com/JakeWharton/timber/releases/tag/5.0.0 +[4.7.1]: https://github.com/JakeWharton/timber/releases/tag/4.7.1 +[4.7.0]: https://github.com/JakeWharton/timber/releases/tag/4.7.0 +[4.6.1]: https://github.com/JakeWharton/timber/releases/tag/4.6.1 +[4.6.0]: https://github.com/JakeWharton/timber/releases/tag/4.6.0 +[4.5.1]: https://github.com/JakeWharton/timber/releases/tag/4.5.1 +[4.5.0]: https://github.com/JakeWharton/timber/releases/tag/4.5.0 +[4.4.0]: https://github.com/JakeWharton/timber/releases/tag/4.4.0 +[4.3.1]: https://github.com/JakeWharton/timber/releases/tag/4.3.1 +[4.3.0]: https://github.com/JakeWharton/timber/releases/tag/4.3.0 +[4.2.0]: https://github.com/JakeWharton/timber/releases/tag/4.2.0 +[4.1.2]: https://github.com/JakeWharton/timber/releases/tag/4.1.2 +[4.1.1]: https://github.com/JakeWharton/timber/releases/tag/4.1.1 +[4.1.0]: https://github.com/JakeWharton/timber/releases/tag/4.1.0 +[4.0.1]: https://github.com/JakeWharton/timber/releases/tag/4.0.1 +[4.0.0]: https://github.com/JakeWharton/timber/releases/tag/4.0.0 +[3.1.0]: https://github.com/JakeWharton/timber/releases/tag/3.1.0 +[3.0.2]: https://github.com/JakeWharton/timber/releases/tag/3.0.2 +[3.0.1]: https://github.com/JakeWharton/timber/releases/tag/3.0.1 +[3.0.0]: https://github.com/JakeWharton/timber/releases/tag/3.0.0 +[2.7.1]: https://github.com/JakeWharton/timber/releases/tag/2.7.1 +[2.7.0]: https://github.com/JakeWharton/timber/releases/tag/2.7.0 +[2.6.0]: https://github.com/JakeWharton/timber/releases/tag/2.6.0 +[2.5.1]: https://github.com/JakeWharton/timber/releases/tag/2.5.1 +[2.5.0]: https://github.com/JakeWharton/timber/releases/tag/2.5.0 +[2.4.2]: https://github.com/JakeWharton/timber/releases/tag/2.4.2 +[2.4.1]: https://github.com/JakeWharton/timber/releases/tag/2.4.1 +[2.4.0]: https://github.com/JakeWharton/timber/releases/tag/2.4.0 +[2.3.0]: https://github.com/JakeWharton/timber/releases/tag/2.3.0 +[2.2.2]: https://github.com/JakeWharton/timber/releases/tag/2.2.2 +[2.2.1]: https://github.com/JakeWharton/timber/releases/tag/2.2.1 +[2.2.0]: https://github.com/JakeWharton/timber/releases/tag/2.2.0 +[2.1.0]: https://github.com/JakeWharton/timber/releases/tag/2.1.0 +[2.0.0]: https://github.com/JakeWharton/timber/releases/tag/2.0.0 +[1.1.0]: https://github.com/JakeWharton/timber/releases/tag/1.1.0 +[1.0.0]: https://github.com/JakeWharton/timber/releases/tag/1.0.0 diff --git a/README.md b/README.md index 7debb03da..bcb5668b4 100644 --- a/README.md +++ b/README.md @@ -83,10 +83,38 @@ Download -------- ```groovy -implementation 'com.jakewharton.timber:timber:4.7.1' +repositories { + mavenCental() +} + +dependencies { + implementation 'com.jakewharton.timber:timber:5.0.0' +} ``` -Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap]. +Documentation is available at [jakewharton.github.io/timber/docs/5.x/](https://jakewharton.github.io/timber/docs/5.x/). + +
+Snapshots of the development version are available in Sonatype's snapshots repository. +

+ +```groovy +repositories { + mavenCental() + maven { + url 'https://oss.sonatype.org/content/repositories/snapshots/' + } +} + +dependencies { + implementation 'com.jakewharton.timber:timber:5.1.0-SNAPSHOT' +} +``` + +Snapshot documentation is available at [jakewharton.github.io/timber/docs/latest/](https://jakewharton.github.io/timber/docs/latest/). + +

+
License diff --git a/RELEASING.md b/RELEASING.md index c60a8f61c..e5b9f0f5b 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,13 +1,46 @@ -Releasing -======== - - 1. Change the version in `gradle.properties` to a non-SNAPSHOT version. - 2. Update the `CHANGELOG.md` for the impending release. - 3. Update the `README.md` with the new version. - 4. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version) - 5. `./gradlew clean uploadArchives` - 6. `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version) - 7. Update the `gradle.properties` to the next SNAPSHOT version. - 8. `git commit -am "Prepare next development version."` - 9. `git push && git push --tags` - 10. Visit [Sonatype Nexus](https://oss.sonatype.org/) and promote the artifact. +# Releasing + +1. Update the `VERSION_NAME` in `gradle.properties` to the release version. + +2. Update the `CHANGELOG.md`: + 1. Change the `Unreleased` header to the release version. + 2. Add a link URL to ensure the header link works. + 3. Add a new `Unreleased` section to the top. + +3. Update the `README.md`: + 1. Change the "Download" section to reflect the new release version. + 2. Change the snapshot section to reflect the next "SNAPSHOT" version, if it is changing. + 3. Update the Kotlin version compatibility table + +4. Commit + + ``` + $ git commit -am "Prepare version X.Y.X" + ``` + +5. Manually release and upload artifacts + 1. Run `./gradlew -p mosaic clean publish` + 2. Visit [Sonatype Nexus](https://oss.sonatype.org/) and promote the artifact. + 3. If either fails, drop the Sonatype repo, fix the problem, commit, and restart this section. + +6. Tag + + ``` + $ git tag -am "Version X.Y.Z" X.Y.Z + ``` + +7. Update the `VERSION_NAME` in `gradle.properties` to the next "SNAPSHOT" version. + +8. Commit + + ``` + $ git commit -am "Prepare next development version" + ``` + +9. Push! + + ``` + $ git push && git push --tags + ``` + + This will trigger a GitHub Action workflow which will create a GitHub release. diff --git a/gradle.properties b/gradle.properties index 264c8a285..4ee581ae3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ GROUP=com.jakewharton.timber # HEY! If you change the major version here be sure to update release.yaml doc target folder! -VERSION_NAME=4.8.0-SNAPSHOT +VERSION_NAME=5.0.0 POM_DESCRIPTION=No-nonsense injectable logging.