Description
I'm using this function to configure build-logic plugins which build upon each other. Not ideal, but it works.
I tried to change this to make Compat-Patrouille check dependencies:
fun Project.configureWithCompatPatrouille() {
configureJavaCompatibility(versionFromCatalog("jdk").toInt())
configureKotlinCompatibility(versionFromCatalog("org.jetbrains.kotlin"))
extensions.configure<CompatPatrouilleExtension>("compatPatrouille") {
// The next line is for debugging only
project.configurations.forEach { println("$project: configuration '$it'") }
checkApiDependencies(Severity.ERROR)
checkRuntimeDependencies(Severity.ERROR)
}
}
Now I'm getting
FAILURE: Build failed with an exception.
* Where:
Build file '/home/oliver/Repositories/open-source/infix/testBalloon/experiments/build.gradle.kts' line: 3
* What went wrong:
An exception occurred applying plugin request [id: 'buildLogic.multiplatform']
> Failed to apply plugin 'buildLogic.multiplatform'.
> Configuration with name 'jvmApiElements' not found.
Apparently, the experiments project configuration is incomplete at the time checkApiDependencies() runs. What would be the ideal way to avoid such lifecycle issues?
Description
I'm using this function to configure
build-logicplugins which build upon each other. Not ideal, but it works.I tried to change this to make Compat-Patrouille check dependencies:
Now I'm getting
Apparently, the
experimentsproject configuration is incomplete at the timecheckApiDependencies()runs. What would be the ideal way to avoid such lifecycle issues?