Skip to content

Commit 9d64197

Browse files
committed
Make BaseKotlinExtension compatible with isolated projects
1 parent 5e97212 commit 9d64197

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2025 DiffPlug
2+
* Copyright 2023-2026 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.
@@ -160,7 +160,7 @@ private KtlintConfig(
160160
Map<String, Object> editorConfigOverride,
161161
List<String> customRuleSets) throws IOException {
162162
Objects.requireNonNull(version);
163-
File defaultEditorConfig = getProject().getRootProject().file(".editorconfig");
163+
File defaultEditorConfig = new File(getProject().getRootDir(), ".editorconfig");
164164
FileSignature editorConfigPath = defaultEditorConfig.exists() ? FileSignature.signAsList(defaultEditorConfig) : null;
165165
this.version = version;
166166
this.editorConfigPath = editorConfigPath;

0 commit comments

Comments
 (0)