Timo Gruen
02/01/2021, 4:42 PMbuildSrc/src/main/kotlin/example.kotlin-convention.gradle.kts
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm")
id("example.java-conventions")
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
}
Unfortunately with Aspects
one isn’t allowed to define the version in the plugins
block, so I had to add the version to the buildSrc/build.gradle.kts
dependencies {
...
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72")
...
}
The stacktrace:Vampire
02/01/2021, 4:55 PMAspects
But it is correct, that you cannot use use a version in plugins
blocks of pre-compiled script plugins, but that you add those plugins to the class path in the build script.
Can you maybe provide an MCVE that shows what you are struggling with?Timo Gruen
02/01/2021, 5:01 PMpre-compiled scripts
are referenced as aspects
. (Example: https://docs.gradle.org/current/samples/sample_jvm_multi_project_with_code_coverage.html)Timo Gruen
02/01/2021, 5:02 PMTimo Gruen
02/01/2021, 5:20 PMVampire
02/01/2021, 5:23 PMaspects
, they at most call them "aspects".
If you write aspect
or Aspect
I assume you are talking about some code construct or similar that I'm not familiar with.
They just use "aspect" as descriptive term imho, but they still call it pre-compiled script plugin or convention plugin. 🙂Vampire
02/01/2021, 5:24 PMV
part. 🙂
Try to make it an MCVE and you maybe already have your answer. 🙂Timo Gruen
02/01/2021, 7:09 PM