Update CollectScreenshotsTask to handle Kotlin 2.1.20 changes
Kotlin 2.1.20 altered the structure of output.classesDirs, which can no longer assume a single file. Updated the task to filter for the correct path, ensuring compatibility with the new Kotlin version.
This commit is contained in:
@@ -55,7 +55,8 @@ kotlin {
|
||||
val demo by creating {
|
||||
associateWith(main)
|
||||
tasks.register<CollectScreenshotsTask>("collectScreenshots") {
|
||||
inputDir.set(output.classesDirs.singleFile)
|
||||
// since Kotlin 2.1.20 output.classesDirs no longer contains a single file
|
||||
inputDir.set(output.classesDirs.filter { it.path.contains("classes/kotlin") }.singleFile)
|
||||
runtimeDependencies.set(runtimeDependencyFiles)
|
||||
outputDir.set(project.file(project.projectDir.toString() + "/images"))
|
||||
dependsOn(compileTaskProvider)
|
||||
|
||||
Reference in New Issue
Block a user