@@ -128,7 +128,10 @@ val samplesTest = tasks.register<Test>("samplesTest") {
128
128
ignoreFailures = true
129
129
130
130
testClassesDirs = fileTree(" ${layout.buildDirectory.get().asFile.path} /classes/testWithOutputs/kotlin" )
131
- classpath = files(" ${layout.buildDirectory.get().asFile.path} /classes/testWithOutputs/kotlin" ) + configurations[" samplesRuntimeClasspath" ] + sourceSets[" main" ].runtimeClasspath
131
+ classpath =
132
+ files(" ${layout.buildDirectory.get().asFile.path} /classes/testWithOutputs/kotlin" ) +
133
+ configurations[" samplesRuntimeClasspath" ] +
134
+ sourceSets[" main" ].runtimeClasspath
132
135
}
133
136
134
137
val clearSamplesOutputs by tasks.creating {
@@ -177,10 +180,12 @@ val installGitPreCommitHook by tasks.creating(Copy::class) {
177
180
fileMode = 755
178
181
179
182
// Workaround for https://github.com/Kotlin/dataframe/issues/612
180
- if (OSType .identify() in listOf (OSType .Mac , OSType .Linux )) doLast {
181
- exec {
182
- workingDir(gitHooksDir)
183
- commandLine(" chmod" , " 755" , " pre-commit" )
183
+ if (OSType .identify() in listOf (OSType .Mac , OSType .Linux )) {
184
+ doLast {
185
+ exec {
186
+ workingDir(gitHooksDir)
187
+ commandLine(" chmod" , " 755" , " pre-commit" )
188
+ }
184
189
}
185
190
}
186
191
} else {
@@ -207,14 +212,17 @@ val kotlinTestSources: FileCollection = kotlin.sourceSets.test.get().kotlin.sour
207
212
208
213
fun pathOf (vararg parts : String ) = parts.joinToString(File .separator)
209
214
215
+ // Include both test and main sources for cross-referencing, Exclude generated sources
216
+ val processKDocsMainSources = (kotlinMainSources + kotlinTestSources)
217
+ .filterNot { pathOf(" build" , " generated" ) in it.path }
218
+
210
219
// Task to generate the processed documentation
211
- val processKDocsMain by creatingProcessDocTask(
212
- sources = (kotlinMainSources + kotlinTestSources) // Include both test and main sources for cross-referencing
213
- .filterNot { pathOf(" build" , " generated" ) in it.path }, // Exclude generated sources
214
- ) {
220
+ val processKDocsMain by creatingProcessDocTask(processKDocsMainSources) {
215
221
target = file(generatedSourcesFolderName)
216
222
arguments + = ARG_DOC_PROCESSOR_LOG_NOT_FOUND to false
217
-
223
+ exportAsHtml {
224
+ dir = file(" ../docs/StardustDocs/snippets" )
225
+ }
218
226
task {
219
227
group = " KDocs"
220
228
doLast {
@@ -246,9 +254,11 @@ tasks.withType<Jar> {
246
254
pathOf(" src" , " test" , " kotlin" ) in it.path ||
247
255
pathOf(" src" , " test" , " java" ) in it.path
248
256
} // filter out test sources again
249
- .plus(kotlinMainSources.filter {
250
- pathOf(" build" , " generated" ) in it.path
251
- }) // Include generated sources (which were excluded above)
257
+ .plus(
258
+ kotlinMainSources.filter {
259
+ pathOf(" build" , " generated" ) in it.path
260
+ },
261
+ ), // Include generated sources (which were excluded above)
252
262
)
253
263
}
254
264
}
@@ -361,8 +371,8 @@ tasks.test {
361
371
excludes.set(
362
372
listOf (
363
373
" org.jetbrains.kotlinx.dataframe.jupyter.*" ,
364
- " org.jetbrains.kotlinx.dataframe.jupyter.SampleNotebooksTests"
365
- )
374
+ " org.jetbrains.kotlinx.dataframe.jupyter.SampleNotebooksTests" ,
375
+ ),
366
376
)
367
377
}
368
378
}
0 commit comments