I try to use kapt
and vertx-Codegen
to generate my service.But the output path is /build/generated/source/kapt/main/
. I want /src/main/generated/
.
Config the build.gradle.kts
,I find generate adoc
to /src/main/generated/
,but other files no change.
There is build.gradle.kts
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.3.30"
kotlin("kapt") version "1.3.30"
id("io.vertx.vertx-plugin") version "0.8.0"
}
val vertxVersion = "3.8.0"
// ......
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
}
dependencies {
// ....
implementation("io.vertx:vertx-codegen")
kapt("io.vertx:vertx-service-proxy:$vertxVersion:processor")
kapt("io.vertx:vertx-codegen:$vertxVersion:processor")
// ....
}
kapt{
arguments {
arg("codegen.output", project.file("src/main/generated").path)
arg("kapt.kotlin.generated", project.file("src/main/generated").path)
}
javacOptions {
option("-AoutputDirectory", project.file("src/main/generated").path)
option("-Acodegen.output", project.file("src/main/generated").path)
}
}
I expect the output path is /src/main/generated/
, but the actual output path is /build/generated/source/kapt/main/
. Can you help me...?