Skip to content

Commit ba529f5

Browse files
authored
Make BaseGroovyExtension and BaseKotlinExtension public (#1912)
2 parents b5026ae + 0d1f612 commit ba529f5

File tree

5 files changed

+18
-14
lines changed

5 files changed

+18
-14
lines changed

plugin-gradle/CHANGES.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,22 @@
33
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.27.0`).
44

55
## [Unreleased]
6+
### Fixed
7+
* Make `BaseGroovyExtension` and `BaseKotlinExtension` public. ([#1912](https://github.com/diffplug/spotless/pull/1912))
68

79
## [6.23.0] - 2023-11-27
810
### Added
9-
* Support custom rule sets for Ktlint. ([#1896](https://github.com/diffplug/spotless/pull/1896)
11+
* Support custom rule sets for Ktlint. ([#1896](https://github.com/diffplug/spotless/pull/1896))
1012
### Fixed
13+
* Fix `GoogleJavaFormatConfig.reorderImports` not working. ([#1872](https://github.com/diffplug/spotless/issues/1872))
1114
* Fix Eclipse JDT on some settings files. ([#1864](https://github.com/diffplug/spotless/pull/1864) fixes [#1638](https://github.com/diffplug/spotless/issues/1638))
1215
* Check if EditorConfig file exist for Ktlint in KotlinGradleExtension. ([#1889](https://github.com/diffplug/spotless/pull/1889))
1316
### Changes
1417
* Bump default `ktlint` version to latest `1.0.0` -> `1.0.1`. ([#1855](https://github.com/diffplug/spotless/pull/1855))
1518
* Add a Step to remove semicolons from Groovy files. ([#1881](https://github.com/diffplug/spotless/pull/1881))
16-
### Fixed
17-
* Fix `GoogleJavaFormatConfig.reorderImports` not working. ([#1872](https://github.com/diffplug/spotless/issues/1872))
19+
* **POSSIBLY BREAKING** `userData` method has been removed from Ktlint step in ([#1891](https://github.com/diffplug/spotless/pull/1891)), you may use `editorConfigOverride` instead.
20+
* **POSSIBLY BREAKING** Reuse configs for `KotlinExtension` and `KotlinGradleExtension` in ([#1890](https://github.com/diffplug/spotless/pull/1890)), this may break your integrations in Gradle Kotlin DSL, wait for Spotless 6.23.1 to fix this.
21+
* **POSSIBLY BREAKING** Reuse configs for `GroovyExtension` and `GroovyGradleExtension` in ([#1890](https://github.com/diffplug/spotless/pull/1890)), this may break your integrations in Gradle Kotlin DSL, wait for Spotless 6.23.1 to fix this.
1822

1923
## [6.22.0] - 2023-09-28
2024
### Added

plugin-gradle/src/main/java/com/diffplug/gradle/spotless/BaseGroovyExtension.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import com.diffplug.spotless.groovy.RemoveSemicolonsStep;
2828
import com.diffplug.spotless.java.ImportOrderStep;
2929

30-
abstract class BaseGroovyExtension extends FormatExtension {
30+
public abstract class BaseGroovyExtension extends FormatExtension {
3131
protected BaseGroovyExtension(SpotlessExtension spotless) {
3232
super(spotless);
3333
}

plugin-gradle/src/main/java/com/diffplug/gradle/spotless/BaseKotlinExtension.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import com.diffplug.spotless.kotlin.KtLintStep;
3434
import com.diffplug.spotless.kotlin.KtfmtStep;
3535

36-
abstract class BaseKotlinExtension extends FormatExtension {
36+
public abstract class BaseKotlinExtension extends FormatExtension {
3737
protected BaseKotlinExtension(SpotlessExtension spotless) {
3838
super(spotless);
3939
}

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/KotlinExtensionTest.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -143,21 +143,21 @@ void testSetEditorConfigCanOverrideEditorConfigFile() throws IOException {
143143

144144
@Test
145145
void withCustomRuleSetApply() throws IOException {
146-
setFile("build.gradle").toLines(
146+
setFile("build.gradle.kts").toLines(
147147
"plugins {",
148-
" id 'org.jetbrains.kotlin.jvm' version '1.6.21'",
149-
" id 'com.diffplug.spotless'",
148+
" id(\"org.jetbrains.kotlin.jvm\") version \"1.6.21\"",
149+
" id(\"com.diffplug.spotless\")",
150150
"}",
151151
"repositories { mavenCentral() }",
152152
"spotless {",
153153
" kotlin {",
154154
" ktlint(\"1.0.1\")",
155-
" .customRuleSets([",
155+
" .customRuleSets(listOf(",
156156
" \"io.nlopez.compose.rules:ktlint:0.3.3\"",
157-
" ])",
158-
" .editorConfigOverride([",
159-
" ktlint_function_naming_ignore_when_annotated_with: \"Composable\",",
160-
" ])",
157+
" ))",
158+
" .editorConfigOverride(mapOf(",
159+
" \"ktlint_function_naming_ignore_when_annotated_with\" to \"Composable\"",
160+
" ))",
161161
" }",
162162
"}");
163163
setFile("src/main/kotlin/Main.kt").toResource("kotlin/ktlint/listScreen.dirty");

plugin-maven/CHANGES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
77
## [2.41.0] - 2023-11-27
88
### Added
99
* CompileSourceRoots and TestCompileSourceRoots are now respected as default includes. These properties are commonly set when adding extra source directories. ([#1846](https://github.com/diffplug/spotless/issues/1846))
10-
* Support custom rule sets for Ktlint. ([#1896](https://github.com/diffplug/spotless/pull/1896)
10+
* Support custom rule sets for Ktlint. ([#1896](https://github.com/diffplug/spotless/pull/1896))
1111
### Fixed
1212
* Fix crash when build dir is a softlink to another directory. ([#1859](https://github.com/diffplug/spotless/pull/1859))
1313
* Fix Eclipse JDT on some settings files. ([#1864](https://github.com/diffplug/spotless/pull/1864) fixes [#1638](https://github.com/diffplug/spotless/issues/1638))

0 commit comments

Comments
 (0)