From 45003b5277e9fac685ba418ef1032a6b6f6fad2d Mon Sep 17 00:00:00 2001 From: Stefan M Date: Sat, 19 Aug 2023 20:39:12 +0200 Subject: [PATCH] Use kotlin sourceSet instead of java For detailed reasons check the following issue: https://github.com/JLLeitschuh/ktlint-gradle/issues/702 --- .../jlleitschuh/gradle/ktlint/android/AndroidPluginsApplier.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/android/AndroidPluginsApplier.kt b/plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/android/AndroidPluginsApplier.kt index ebf38a70..9e4b0072 100644 --- a/plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/android/AndroidPluginsApplier.kt +++ b/plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/android/AndroidPluginsApplier.kt @@ -69,7 +69,7 @@ private fun androidPluginConfigureAction( androidCommonExtension.sourceSets.all { sourceSet -> // https://issuetracker.google.com/u/1/issues/170650362 - val androidSourceSet = sourceSet.java as DefaultAndroidSourceDirectorySet + val androidSourceSet = sourceSet.kotlin as DefaultAndroidSourceDirectorySet // Passing Callable, so returned FileCollection, will lazy evaluate it // only when task will need it. // Solves the problem of having additional source dirs in