[build] Restructure to composite build

This commit is contained in:
2025-10-26 02:03:53 +02:00
parent 0e3990aed9
commit 1fbc97866c
348 changed files with 126 additions and 64 deletions

View File

@@ -0,0 +1,34 @@
import io.freefair.gradle.plugins.lombok.tasks.Delombok
plugins {
java
`java-library`
alias(libs.plugins.lombok)
}
val expandedSourcesElements = configurations.consumable("expandedSourcesElements") {
extendsFrom(configurations.implementation.get())
attributes {
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType.SOURCES))
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL))
}
}
val delombok = tasks.getByName<Delombok>("delombok")
val sourcesJar by tasks.registering(Jar::class) {
group = LifecycleBasePlugin.BUILD_GROUP
dependsOn(delombok)
from(delombok.target)
archiveClassifier.set("sources")
}
artifacts.add(expandedSourcesElements.name, sourcesJar)
tasks.named("build") { dependsOn(sourcesJar) }
components.named<AdhocComponentWithVariants>("java") {
addVariantsFromConfiguration(expandedSourcesElements.get()) {}
}