Restructure codegen task

This commit is contained in:
Iaroslav Postovalov 2020-10-11 03:37:04 +07:00
parent 21dfc37727
commit 922d27fb62
No known key found for this signature in database
GPG Key ID: 46E15E4A31B3BCD7

View File

@ -29,17 +29,17 @@ kotlin {
sourceSets { sourceSets {
val nativeMain by getting { val nativeMain by getting {
val codegen by tasks.creating {
matricesCodegen(kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Matrices.kt")
vectorsCodegen(kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Vectors.kt")
}
kotlin.srcDirs(files().builtBy(codegen))
dependencies { dependencies {
api(project(":kmath-core")) api(project(":kmath-core"))
api("org.jetbrains.kotlinx:kotlinx-io:0.2.0-tvis-3") api("org.jetbrains.kotlinx:kotlinx-io:0.2.0-tvis-3")
} }
} }
} }
val codegen: Task by tasks.creating {
matricesCodegen(kotlin.sourceSets["nativeMain"].kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Matrices.kt")
vectorsCodegen(kotlin.sourceSets["nativeMain"].kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Vectors.kt")
}
sourceSets["nativeMain"].kotlin.srcDirs(files().builtBy(codegen))
} }