Skip to content

Commit ffe59ac

Browse files
committed
Fix data schema resolution dir for subprojects
1 parent 1d28a8d commit ffe59ac

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/annotations/ImportDataSchema.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ package org.jetbrains.kotlinx.dataframe.annotations
99
* @param name name of the generated interface
1010
* @param path URL or relative path to data.
1111
* if path starts with protocol (http, https, ftp), it's considered a URL. Otherwise, it's treated as relative path.
12-
* By default, it will be resolved relatively to project root dir, i.e. File(projectRootDir, path)
12+
* By default, it will be resolved relatively to project dir, i.e. File(projectDir, path)
1313
* You can configure it by passing `dataframe.resolutionDir` option to preprocessor, see https://kotlinlang.org/docs/ksp-quickstart.html#pass-options-to-processors
1414
* @param visibility visibility of the generated interface.
1515
* @param normalizationDelimiters if not empty, split property names by delimiters,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ internal class KspPluginApplier : Plugin<Project> {
2323
target.configurations.getByName("ksp").dependencies.add(
2424
target.dependencies.create("org.jetbrains.kotlinx.dataframe:symbol-processor:$preprocessorVersion")
2525
)
26-
target.extensions.getByType<KspExtension>().arg("dataframe.resolutionDir", target.rootDir.absolutePath)
26+
target.extensions.getByType<KspExtension>().arg("dataframe.resolutionDir", target.projectDir.absolutePath)
2727
}
2828
}

plugins/symbol-processor/src/main/kotlin/org/jetbrains/dataframe/ksp/DataSchemaGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class DataSchemaGenerator(
101101
private fun reportMissingKspArgument(file: KSFile) {
102102
logger.error("""
103103
|KSP option with key "dataframe.resolutionDir" must be set in order to use relative path in @${ImportDataSchema::class.simpleName}
104-
|DataFrame Gradle plugin should set it by default to "project.rootDir".
104+
|DataFrame Gradle plugin should set it by default to "project.projectDir".
105105
|If you do not use DataFrame Gradle plugin, configure option manually
106106
""".trimMargin(), symbol = file)
107107
}

0 commit comments

Comments
 (0)