Skip to content

Commit 9c57d6f

Browse files
committed
Revert build script changes
1 parent 3a70e08 commit 9c57d6f

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

hll/dynamodb-mapper/dynamodb-mapper/build.gradle.kts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import aws.sdk.kotlin.gradle.kmp.NATIVE_ENABLED
77
import com.amazonaws.services.dynamodbv2.local.main.ServerRunner
88
import com.amazonaws.services.dynamodbv2.local.server.DynamoDBProxyServer
99
import com.google.devtools.ksp.gradle.KspTaskJvm
10+
import com.google.devtools.ksp.gradle.KspTaskMetadata
1011
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
1112
import java.nio.file.Files
1213
import java.nio.file.StandardCopyOption
@@ -71,21 +72,11 @@ if (project.NATIVE_ENABLED) {
7172
// https://github.com/google/ksp/issues/965
7273
dependencies.kspCommonMainMetadata(project(":hll:dynamodb-mapper:dynamodb-mapper-ops-codegen"))
7374

74-
// Set up task dependencies since KSP doesn't handle this well:
75-
tasks.withType<KotlinCompilationTask<*>>().all {
76-
if (name != "kspCommonMainKotlinMetadata") {
77-
dependsOn("kspCommonMainKotlinMetadata")
78-
}
79-
}
80-
81-
listOf("sourcesJar", "linuxX64SourcesJar", "jvmSourcesJar").forEach {
82-
tasks.named(it) {
83-
dependsOn("kspCommonMainKotlinMetadata")
84-
}
85-
}
86-
8775
kotlin.sourceSets.commonMain {
88-
kotlin.srcDir("build/generated/ksp/metadata/commonMain/kotlin")
76+
tasks.withType<KspTaskMetadata> {
77+
// Wire up the generated source to the commonMain source set
78+
kotlin.srcDir(destinationDirectory)
79+
}
8980
}
9081
} else {
9182
// FIXME This is a dirty hack for JVM-only builds which KSP doesn't consider to be "multiplatform". Explanation of

0 commit comments

Comments
 (0)