Skip to content

Commit

Permalink
Add notice for bundled jdk (elastic#40576)
Browse files Browse the repository at this point in the history
* Add notice for bundled jdk

This commit adds the license/notice for the bundled openjdk.

* First draft

* iteration

* Fix package notices

* Iteration

* One more iteration
  • Loading branch information
rjernst authored and jasontedor committed Mar 29, 2019
1 parent 237a2c4 commit 0ad3d90
Show file tree
Hide file tree
Showing 5 changed files with 379 additions and 9 deletions.
2 changes: 1 addition & 1 deletion distribution/archives/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, String pla
rename { 'LICENSE.txt' }
}

with noticeFile
with noticeFile(oss, jdk)
into('modules') {
with modulesFiles
}
Expand Down
30 changes: 23 additions & 7 deletions distribution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,17 @@ task buildServerNotice(type: NoticeTask) {
// other distributions include notices from modules as well, which are added below later
task buildDefaultNotice(type: NoticeTask) {
licensesDir new File(project(':server').projectDir, 'licenses')
licensesDir new File(project(':distribution').projectDir, 'licenses')
}

// other distributions include notices from modules as well, which are added below later
task buildOssNotice(type: NoticeTask) {
licensesDir new File(project(':server').projectDir, 'licenses')
licensesDir new File(project(':distribution').projectDir, 'licenses')
}
task buildDefaultNoJdkNotice(type: NoticeTask) {
licensesDir new File(project(':server').projectDir, 'licenses')
}
task buildOssNoJdkNotice(type: NoticeTask) {
licensesDir new File(project(':server').projectDir, 'licenses')
}

/*****************************************************************************
Expand Down Expand Up @@ -377,11 +383,21 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
}
}

noticeFile = copySpec {
if (project.name == 'integ-test-zip') {
from buildServerNotice
} else {
from buildDefaultNotice
noticeFile = { oss, jdk ->
copySpec {
if (project.name == 'integ-test-zip') {
from buildServerNotice
} else {
if (oss && jdk) {
from buildOssNotice
} else if (oss) {
from buildOssNoJdkNotice
} else if (jdk) {
from buildDefaultNotice
} else {
from buildDefaultNoJdkNotice
}
}
}
}

Expand Down
Loading

0 comments on commit 0ad3d90

Please sign in to comment.