Strum355
06/29/2021, 5:56 PMbuild.gradle.kts
file in order to test my compiler plugin (without the more "recommended" route of creating a gradle plugin), but Im not seeing it working for multi-project gradle projects. The plugin seems to only get invoked for a single sub-project, as per the screenshot only displaying output mentioning the sub-project with a single Kotlin file (I am printing out the list of KtFile virtualPath in the analysisCompleted
method). Project can be found here https://github.com/Strum355/lsif-kotlin (the snippet below would be in the root build.gradle.kts
)
allprojects {
tasks.withType<KotlinCompile> {
val targetroot = File(this@allprojects.buildDir, "semanticdb-targetroot")
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-Xplugin=/home/noah/Sourcegraph/lsif-kotlin/semanticdb-kotlinc-1.0-SNAPSHOT-all.jar",
"-P",
"plugin:com.sourcegraph.lsif-kotlin:sourceroot=${this@allprojects.projectDir.path}",
"-P",
"plugin:com.sourcegraph.lsif-kotlin:targetroot=${targetroot}"
)
}
}
}
Strum355
06/29/2021, 6:17 PMfreeCompilerArgs
🤦♂️
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
freeCompilerArgs = listOf("-Xinline-classes") // instead of freeCompilerArgs + listOf("-Xinline-classes")
}