Skip to content

Commit

Permalink
Add sources and javadoc jars, Fix staging directory
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenbaker committed Feb 6, 2025
1 parent e0f88a7 commit 5820c16
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
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

0 comments on commit 5820c16

Please sign in to comment.