diff --git a/conventions/src/main/kotlin/otel.japicmp-conventions.gradle.kts b/conventions/src/main/kotlin/otel.japicmp-conventions.gradle.kts index c61f76432370..941ebc40cfee 100644 --- a/conventions/src/main/kotlin/otel.japicmp-conventions.gradle.kts +++ b/conventions/src/main/kotlin/otel.japicmp-conventions.gradle.kts @@ -98,9 +98,9 @@ if (project.findProperty("otel.stable") == "true") { ?: file("$rootDir/docs/apidiffs/current_vs_$baseVersionString/${base.archivesName.get()}.txt") ) } - // have the check task depend on the api comparison task, to make it more likely it will get used. - named("check") { - dependsOn(jApiCmp) + // have the jApiCmp task run every time the jar task is run, to make it more likely it will get used. + named("jar") { + finalizedBy(jApiCmp) } } }