File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
plugins/symbol-processor/src/main/kotlin/org/jetbrains/dataframe/ksp Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ class DataFrameSymbolProcessor(
77
77
}
78
78
.partition { it.first.validate() }
79
79
80
+ val outputDirectory = File (configuration.importedSchemasOutput)
80
81
validDeclarations
81
82
.forEach { (classDeclaration, annotation) ->
82
83
val reader = providers.firstOrNull { it.accepts(annotation.source, annotation.qualifier) }
@@ -86,8 +87,11 @@ class DataFrameSymbolProcessor(
86
87
" data" to JsonPrimitive (annotation.source),
87
88
)
88
89
val df = reader.default(annotation.source)
90
+ if (! outputDirectory.exists()) {
91
+ outputDirectory.mkdirs()
92
+ }
89
93
File (
90
- File (configuration.importedSchemasOutput) ,
94
+ outputDirectory ,
91
95
" ${classDeclaration.simpleName.asString()} .json" ,
92
96
).writeText(df.schema().toJsonString(metadata = metadata))
93
97
} else {
You can’t perform that action at this time.
0 commit comments