Skip to content

Commit

Permalink
resolves FoundationDB#1703: publish test jar artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
normen662 authored and hatyo committed May 31, 2022
1 parent 1f1e6e1 commit 7f704ad
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions build.gradle
Expand Up @@ -202,6 +202,7 @@ subprojects {
artifacts {
add("archives", tasks.sourcesJar)
add("archives", tasks.javadocJar)
add("archives", tasks.testJar)
}

afterEvaluate { project ->
Expand Down
2 changes: 1 addition & 1 deletion docs/ReleaseNotes.md
Expand Up @@ -33,7 +33,7 @@ This release also updates downstream dependency versions. Most notably, the prot
* **Feature** Feature 1 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Feature** Feature 2 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Feature** Feature 3 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Feature** Feature 4 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Feature** Publish test jar as part of the regular distribution [(Issue #1703)](https://github.com/FoundationDB/fdb-record-layer/issues/1703)
* **Feature** Feature 5 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Breaking change** Change 1 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Breaking change** Change 2 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
Expand Down
3 changes: 2 additions & 1 deletion gradle/publishing.gradle
Expand Up @@ -58,6 +58,7 @@ publishing {
from components.java
artifact tasks.sourcesJar
artifact tasks.javadocJar
artifact tasks.testJar
addPublishingInfo(publication)
}
}
Expand Down Expand Up @@ -100,7 +101,7 @@ if (System.getenv('ARTIFACTORY_USER') != null && System.getenv('ARTIFACTORY_KEY'
createDistribution.configure {
afterEvaluate {
dependsOn generatePomFileForLibraryPublication
from tasks.jar, tasks.sourcesJar, tasks.javadocJar, tasks.generatePomFileForLibraryPublication
from tasks.jar, tasks.sourcesJar, tasks.javadocJar, tasks.testJar, tasks.generatePomFileForLibraryPublication
rename { filename ->
GenerateMavenPom pomTask = tasks.generatePomFileForLibraryPublication
Jar jarTask = tasks.jar
Expand Down
2 changes: 1 addition & 1 deletion gradle/testing.gradle
Expand Up @@ -116,7 +116,7 @@ tasks.withType(Test) { task ->
task testJar(type: Jar, dependsOn: testClasses) {
group = 'Build'
description = 'Build a jar file of test classes as an exported artifact'
baseName = "${project.archivesBaseName}-test"
classifier='test'
from sourceSets.test.output
}

Expand Down

0 comments on commit 7f704ad

Please sign in to comment.