Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions dd-sdk-android-dependencies/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,28 @@ publishingJavaConfig(
useJavaLibraryPlatform = false
)

// Maven Central requires a sources jar and a javadoc jar for every published
// component. Because this module exports the shaded shadowJar as its main artifact,
// the platform auto-config is disabled (useJavaLibraryPlatform = false), which also
// skips the sources/javadoc jars Vanniktech would otherwise generate. We attach them
// manually here. This module has no sources of its own, so both jars are effectively
// empty — that still satisfies the Portal's "must be provided" validation.
val sourcesJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
}

val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
}

// Manual publication configuration with shadow jar as the artifact
publishing {
publications {
register<MavenPublication>(MavenConfig.PUBLICATION) {
artifact(tasks.shadowJar)
artifact(sourcesJar)
artifact(javadocJar)
}
}
}
Expand Down
Loading