2026-03-16
- Compile against Kotlin
2.3.20.This release requires Kotlin2.3.20or later. - Raise the Gradle plugin Kotlin target to
2.0, which in turn requires Gradle8.11or later. - Remove the following deprecated targets. See: https://kotl.in/native-targets-tiers.
macosX64iosX64watchosX64tvosX64
2025-11-20
- Add
RedactedCompilerPluginRegistrar.pluginIdfor forward compatibility with Kotlin2.3.0's new API. - Compile against Gradle
9.2.1. - Compile against Kotlin
2.2.21.
2025-09-11
- Update to Kotlin
2.2.20. This release requires2.2.20or later. - Compile against Gradle
9.0.
2025-06-29
- Fix: Handle failed error message when no redacted properties.
Special thanks to @jonapoul for contributing to this release!
2025-06-23
- Fix: Check both the parameter and property declarations for redacted annotations. Depending on the specified annotation target of custom annotations, these may end up in different places.
- Update Kotlin to
2.2.0. This plugin version requires Kotlin2.2.0or later. - Update Gradle plugin to target Kotlin language version to
1.9(requires Gradle 8.3+). - Build against Gradle
8.14.2.
2025-03-26
- Update to Kotlin
2.1.20. This plugin version requires Kotlin2.1.20or later. - Build against Gradle
8.13.
2025-02-22
- Fix: Fix CLI parsing for multiple custom annotations. Note that while the previous version was broken, it would have also failed compilation so there shouldn't be a chance that broken redactions would have made it into a production build.
- Update to Kotlin
2.1.10. - Build against Gradle
8.12.1.
2024-12-20
- Fix FIR diagnostics rendering in the IDE. Note this only works in the K2 Kotlin IDE plugin + setting the IntelliJ
kotlin.k2.only.bundled.compiler.plugins.enabledregistry key tofalse. - When custom annotations are defined, report those names in FIR error messages.
- Support multiple custom annotations.
- For Gradle configuration, the singular
*Annotationproperties are deprecated in favor of plural*AnnotationsSetPropertytypes. - For CLI consumers, the
redactedAnnotationandunredactedAnnotationproperties are nowredactedAnnotationsandunredactedAnnotations.
- For Gradle configuration, the singular
- Build against Gradle
8.12. - Only report errors in FIR now. Removes the
validateIrplugin option. - No longer support K1.
- Raise Gradle plugin Kotlin target to
1.9.
2024-11-29
- Update to Kotlin
2.1.0. This plugin now requires2.1.0or later. - Build against Gradle
8.11.1.
2024-08-22
- Update to Kotlin
2.0.20. - Build against Gradle
8.10.
2024-05-22
- Update to Kotlin
2.0.0(aka K2). This plugin now assumes 2.0, but can be used with Kotlin 1.9.x as well. - Fully implement validation checks in FIR, allowing the plugin to report errors earlier and also (eventually) have errors appear automatically in the IDE.
- The IR plugin no longer validates by default.
- At the time of writing, I'm not able to get errors to appear in the IDE even if non-bundled plugins are force-enabled. Follow KTIJ-29248 for more info.
- The
enabledcompiler option is no longer required and just defaults to true. - Omit the stdlib from transitive dependencies on the compiler plugin and Gradle plugin artifacts. Both kotlinc and Gradle impose their own versions on the classpath.
2024-04-26
- Allow
@Unredactedto be applied to a class, only when a supertype is@Redacted - Allow
@Redactedsupertypes to be inherited by objects, only when the child does not implement a customtoStringmethod - Fail compilation when
@Unredactedand@Redactedare applied to the same class
Special thanks to @DrewCarlson for contributing to this release!
2024-04-23
- New: Support for annotating interfaces and non-final classes as
@Redacted. In this event, alldata/valuesubclasses will be treated as@Redacted. - New: Support for
@Unredactedto explicitly opt out of redacting specific properties in otherwise-redacted classes.@Redacted data class User( @Unredacted val name: String, val phoneNumber: String ) // This will redact `phoneNumber` but not `name` // User(name=Bob, phoneNumber=██)
- Update Kotlin to
1.9.23.
Special thanks to @DrewCarlson for contributing to this release!
2023-11-26
- Update Kotlin to
1.9.21.
2023-10-31
- Update to Kotlin
1.9.20. This plugin now requires1.9.20. - Update wasm target to
wasmJs.
2023-09-02
- Enhancement: Simplify lookup of
KotlinCompilation'simplementationconfiguration name in the Gradle plugin when using the default annotation. - Update to Kotlin
1.9.10. - Build against Gradle
8.3.
2023-07-08
- New: Support
value classtypes. Note that only annotating the class is supported, as annotating the property would be redundant.
2023-07-06
- Update to Kotlin
1.9.0. This plugin now requires1.9.0.
2023-04-03
- Update to Kotlin
1.8.20. This plugin now requires1.8.20. - [annotations] Mark JS binaries as executable.
- [annotations] Remove deprecated
watchosX86(). - [annotations] Add
wasmtarget. Note this is experimental and not stable. - [annotations] Add
androidNativeArm32,androidNativeArm64,androidNativeX86,androidNativeX64, andwatchosDeviceArm64targets.
2023-03-16
- Fix: Missing jvmTarget in the annotations artifact. Target is now properly set to Java 11.
- Update to Kotlin
1.8.10.
2022-12-28
- Update to Kotlin
1.8.0. This release is only compatible with Kotlin 1.8 or later. - Update JVM target to
11. - Kotlin JS artifact now only supports IR.
- Migrate the IR and FIR plugins to new
CompilerPluginRegistrarentrypoint API.
2022-12-03
This release is primarily under-the-hood changes + extra compile-time checks.
- [IR] Fail compilation if both class and any number of properties are annotated with
@Redacted. - [IR] Fail compilation if
@Redactedis used in a non-class context.- Before it would only check if the class is non-data, but with Kotlin 1.8 introducing
data objectclasses we need to also check that the target type is itself a class.
- Before it would only check if the class is non-data, but with Kotlin 1.8 introducing
- [IR] Fail compilation if a custom
toString()function is implemented in a data class using@Redacted. - [IR] Harden
toString()function declaration matching. - [FIR] Promote
REDACTED_ON_CLASS_AND_PROPERTY_WARNINGto error. - Update to Kotlin 1.7.22.
2022-10-03
Experimental support for the new K2 compiler + FIR plugin.
Note this comes with several caveats:
- No IDE support yet
- Errors and warnings can't have custom messages yet: KT-53510.
- Multiple errors and warnings result in only a single error being emitted: KT-54287.
- K2 compiler itself is extremely experimental.
In short, this is only really to unblock anyone doing their own testing of K2 and don't want this plugin to disable it. If you see any issues, please file a bug here and disable K2 in your project in the meantime.
Details on K2 and instructions for enabling it can be found here: https://kotlinlang.org/docs/whatsnew17.html#new-kotlin-k2-compiler-for-the-jvm-in-alpha
Also: update to Kotlin 1.7.20.
2022-06-09
Update to Kotlin 1.7.0.
Note that Kotlin 1.7.0 is now the minimum for this version due to breaking API changes in Kotlin IR APIs.
2022-01-13
- Use
implementationinstead ofapiadding theredacted-compiler-plugin-annotationsdependency. #76
Thanks to @gpeal for contributing to this release!
2021-12-24
Stable release!
While Kotlin IR is not a stable API, the public API of redacted-compiler-plugin is. This project will use semver only for its own API but intermediate versions may only work with specific versions of Kotlin (documented in the changelog).
Changes since 0.10.0
- Remove remaining obsolete descriptor API usages.
- Update to Kotlin
1.6.10.
2021-12-20
This release introduces formal support for Kotlin multiplatform!
There are two parts to this:
- The compiler plugin itself supports all compilation types, not just JVM and Android.
- The first-party annotations artifact is now multiplatform.
The legacy backend support is now removed, IR is required going forward.
2021-11-21
This is a release candidate with support for Kotlin multiplatform. Please test this out and report any issues.
There are two parts to this:
- The compiler plugin itself supports all compilation types, not just JVM and Android.
- The first-party annotations artifact is now multiplatform.
The legacy backend support is now removed, IR is required going forward.
2021-11-16
- Formal support for Kotlin 1.6. This plugin requires Kotlin 1.6 now.
2021-10-15
- Support for Kotlin 1.6 (built against
1.6.0-RC). This release should only be used for testing with Kotlin 1.6 previews.
2021-10-12
This release was accidentally broken and should not be used! Specifically, the gradle plugin accidentally targeted Java 17.
This release was accidentally broken and should not be used! Specifically, the compiler plugin itself was missing a service file and would not run.
2021-02-05
- Change: The gradle plugin id is now
dev.zacsweers.redacted. - Support (and requires) Kotlin 1.4.30.
There may be 0.7.x versions on sonatype. Don't use them, they are broken.
2021-01-10
- Small IR fixes courtesy of @DrewHamilton
2021-01-09
- Gradle plugin extension now uses modern Gradle
PropertyAPIs. Minimum Gradle version is now 5.1. - Android-specific APIs (i.e.
variantFilter) are now removed. If you still want this, consider configuring this manually in your own build however you see fit in tandem with theenabledproperty. - Fix: IR supports redacted classes now too.
2021-01-08
- New! Experimental support for Kotlin IR. Note that IR is still incubating and subject to change.
- Update Kotlin to
1.4.21. - Tested up to JDK 15.
2020-11-27
This version requires Kotlin 1.4.20 or higher!
- Compatible with Kotlin 1.4.20
- Supports Kotlin's new
StringConcatFactoryautomatically when-Xstring-concatis enabled.- See the Kotlin 1.4.20 announcement post for details on
-Xstring-concat.
- See the Kotlin 1.4.20 announcement post for details on
2020-08-15
This is identical in functionality to 0.2.0 but built against Kotlin 1.4.
2020-07-16
This is identical in functionality to 0.2.0 but built against Kotlin 1.4. This version is not considered stable and should only be used for testing compatibility with Kotlin 1.4 pre-releases.
2020-01-25
New: There's now a batteries-included redacted-compiler-plugin-annotations artifact with a @Redacted
annotation you can use if you don't want to manage your own. The redacted Gradle extension now defaults
to this and will automatically add this annotations artifact to your project dependencies if a custom
one isn't set. This means that, if you use the default, then all you need to do to use this plugin
is simply apply the gradle plugin 🎉.
2020-01-24
Initial release!