Skip to content

Commit da2ec65

Browse files
dieppaCopilot
andauthored
refactor: handling robust across Gradle property sources
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent d974f34 commit da2ec65

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

flamingock-gradle-plugin/src/main/kotlin/io/flamingock/gradle/FlamingockPlugin.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ class FlamingockPlugin : Plugin<Project> {
101101
* can exercise the property handling directly.
102102
*/
103103
internal fun shouldAutoApplyKapt(project: Project): Boolean {
104-
val raw = project.findProperty(FlamingockConstants.AUTO_APPLY_KAPT_PROPERTY) as? String
105-
return raw == null || !raw.equals("false", ignoreCase = true)
104+
val raw = project.findProperty(FlamingockConstants.AUTO_APPLY_KAPT_PROPERTY) ?: return true
105+
return !raw.toString().equals("false", ignoreCase = true)
106106
}
107107

108108
private fun validateConfiguration(extension: FlamingockExtension) {

0 commit comments

Comments
 (0)