Skip to content

Commit 09dfa5f

Browse files
committed
allow both regular or extra property for custom ksp configs
1 parent 77e88a1 commit 09dfa5f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

plugins/dataframe-gradle-plugin/src/main/kotlin/org/jetbrains/dataframe/gradle/ConvenienceSchemaGeneratorPlugin.kt

+13-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,19 @@ class ConvenienceSchemaGeneratorPlugin : Plugin<Project> {
4747
}
4848
}
4949
}
50-
val overriddenConfigs =
51-
target.properties.get("kotlin.dataframe.ksp.configs")?.let { (it as String)}?.split(",")
50+
val customConfigsProp = "kotlin.dataframe.ksp.configs"
51+
var overriddenConfigs =
52+
target.properties.get(customConfigsProp)?.let { (it as String)}?.split(",")
53+
if (overriddenConfigs != null) {
54+
overriddenConfigs =
55+
target.extraProperties.get(customConfigsProp)?.let { (it as String)}?.split(",")
56+
} else {
57+
if (customConfigsProp in target.extraProperties.properties) {
58+
target.logger.warn(
59+
"`$customConfigsProp` set as both a regular and an extra property. Only the regular property value is used.",
60+
)
61+
}
62+
}
5263
val configs = when {
5364
overriddenConfigs != null -> overriddenConfigs
5465
isMultiplatform -> listOf("kspJvm","kspJvmTest")

0 commit comments

Comments
 (0)