Skip to content

Commit 7bd0b89

Browse files
authored
Fix SpotlessPredeclareExtension for kotlin users (#1084)
2 parents c66f83e + 6a1f88c commit 7bd0b89

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

β€Žplugin-gradle/CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
66
### Added
77
* πŸŽ‰πŸŽ‰πŸŽ‰ [**IntelliJ plugin**](https://plugins.jetbrains.com/plugin/18321-spotless-gradle) thanks to [@ragurney](https://github.com/ragurney) πŸŽ‰πŸŽ‰πŸŽ‰
88
* Added support for the [palantir-java-format](https://github.com/palantir/palantir-java-format) Java formatter ([#1083](https://github.com/diffplug/spotless/pull/1083)).
9+
### Fixed
10+
* Register `spotlessPredeclare` extension with type `SpotlessExtensionPredeclare` instead of the same `SpotlessExtension` as `spotless` so that Kotlin users can use `configure<SpotlessExtensionPredeclare>` ([#1084](https://github.com/diffplug/spotless/pull/1084)).
911

1012
## [6.1.2] - 2022-01-07
1113
### Fixed

β€Žplugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2021 DiffPlug
2+
* Copyright 2016-2022 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -275,6 +275,6 @@ public void predeclareDeps() {
275275
}
276276

277277
protected void predeclare(GradleProvisioner.Policy policy) {
278-
project.getExtensions().create(SpotlessExtension.class, EXTENSION_PREDECLARE, SpotlessExtensionPredeclare.class, project, policy);
278+
project.getExtensions().create(SpotlessExtensionPredeclare.class, EXTENSION_PREDECLARE, SpotlessExtensionPredeclare.class, project, policy);
279279
}
280280
}

0 commit comments

Comments
Β (0)