Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sources and javadoc jars to publication, Fix staging directory #584

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ jreleaser {
snapshotUrl = "https://aws.oss.sonatype.org/content/repositories/snapshots"
closeRepository.set(true)
releaseRepository.set(true)
stagingRepositories.add("${rootProject.buildDir}/staging")
verifyPom.set(true)
stagingRepository(rootProject.layout.buildDirectory.dir("staging").get().asFile.path)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ val licenseSpec = copySpec {
* Extra Jars
* ============================
*/
// Build a javadoc JAR too.
tasks.register<Jar>("javadocJar") {
from(tasks.named("javadoc"))
archiveClassifier.set("javadoc")
java {
withJavadocJar()
withSourcesJar()
}

// TODO: Remove this once package is ready for docs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ publishing {
repositories {
maven {
name = "stagingRepository"
url = uri("${rootProject.layout.buildDirectory}/staging")
url = rootProject.layout.buildDirectory.dir("staging").get().asFile.toURI()
}
}
// Add license spec to all maven publications
Expand Down
11 changes: 11 additions & 0 deletions framework-errors/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,21 @@ afterEvaluate {
}
}

// TODO: This is needed because the type-mapping file is mapped (twice) in the source-set above and source-set below,
// but really we shouldn't be doing that
tasks.withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}

tasks.named("compileJava") {
dependsOn("smithyBuild")
}

// Needed because sources-jar needs to run after smithy-build is done
tasks.named("sourcesJar") {
mustRunAfter("compileJava")
}

// Helps Intellij plugin identify models
sourceSets {
main {
Expand Down