Skip to content

Commit

Permalink
Constant name for the app-boot.jar in app module (#989)
Browse files Browse the repository at this point in the history
* Constant name for a app-boot.jar

* Update tck/build.gradle

Co-authored-by: Sergei Egorov <[email protected]>

Co-authored-by: Sergei Egorov <[email protected]>
  • Loading branch information
lanwen and bsideup authored Jul 27, 2021
1 parent ceb663e commit b09bf3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jar {

bootJar {
archiveClassifier = 'boot'
archiveVersion = ''
}

dependencies {
Expand Down
14 changes: 12 additions & 2 deletions tck/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,30 @@ tasks.test.dependsOn(
rootProject.project(":plugins:inmemory-records-storage").getTasksByName("jar", false)
)

processResources {
tasks.register('appDependency') {
dependsOn(
tasks.findByPath(":app:sourcesJar"),
tasks.findByPath(":app:bootJar"),
tasks.findByPath(":app:jar")
)

doLast {
def app = tasks.findByPath(":app:bootJar").outputs.files.singleFile
if (app.name != 'app-boot.jar') {
throw new GradleException(':app:bootJar task should produce exactly "app-boot.jar" file to be included into TCK, got: ' + app.absolutePath)
}
}
}

processResources.dependsOn(tasks.appDependency)

sourceSets {
main {
resources.srcDir tasks.findByPath(":app:bootJar").outputs.files.singleFile.parentFile
resources.include 'app-boot.jar'
}
}

sourcesJar {
dependsOn processResources
}
}

0 comments on commit b09bf3b

Please sign in to comment.