[kpm] kgp-idea-proto: Create special binaryValidationApiElements configuration

This will be a 'lean' jar file (un-shadowed), which can later
be used by the binary-compatibility-validator to test the
API surface against.

^KT-52568 Verification Pending
This commit is contained in:
sebastian.sellmair
2022-06-17 11:37:57 +02:00
committed by Space
parent 514ea01175
commit 443faec30d
3 changed files with 17 additions and 2 deletions
@@ -56,6 +56,21 @@ runtimeJar(tasks.register<ShadowJar>("shadowJar")) {
publish()
/* Setup configuration for binary compatibility tests */
run {
val binaryValidationApiElements by configurations.creating {
isCanBeResolved = false
isCanBeConsumed = true
}
val binaryValidationApiJar = tasks.register<Jar>("binaryValidationApiJar") {
this.archiveBaseName.set(project.name + "-api")
from(mainSourceSet.output)
}
artifacts.add(binaryValidationApiElements.name, binaryValidationApiJar)
}
tasks.register<Exec>("protoc") {
val protoSources = file("src/main/proto")
val javaOutput = file("src/generated/java/")