Skip to content

Commit 0ad3d90

Browse files
rjernstjasontedor
authored andcommitted
Add notice for bundled jdk (#40576)
* 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
1 parent 237a2c4 commit 0ad3d90

File tree

5 files changed

+379
-9
lines changed

5 files changed

+379
-9
lines changed

distribution/archives/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, String pla
8484
rename { 'LICENSE.txt' }
8585
}
8686

87-
with noticeFile
87+
with noticeFile(oss, jdk)
8888
into('modules') {
8989
with modulesFiles
9090
}

distribution/build.gradle

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,17 @@ task buildServerNotice(type: NoticeTask) {
5252
// other distributions include notices from modules as well, which are added below later
5353
task buildDefaultNotice(type: NoticeTask) {
5454
licensesDir new File(project(':server').projectDir, 'licenses')
55+
licensesDir new File(project(':distribution').projectDir, 'licenses')
5556
}
56-
57-
// other distributions include notices from modules as well, which are added below later
5857
task buildOssNotice(type: NoticeTask) {
5958
licensesDir new File(project(':server').projectDir, 'licenses')
59+
licensesDir new File(project(':distribution').projectDir, 'licenses')
60+
}
61+
task buildDefaultNoJdkNotice(type: NoticeTask) {
62+
licensesDir new File(project(':server').projectDir, 'licenses')
63+
}
64+
task buildOssNoJdkNotice(type: NoticeTask) {
65+
licensesDir new File(project(':server').projectDir, 'licenses')
6066
}
6167

6268
/*****************************************************************************
@@ -377,11 +383,21 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
377383
}
378384
}
379385

380-
noticeFile = copySpec {
381-
if (project.name == 'integ-test-zip') {
382-
from buildServerNotice
383-
} else {
384-
from buildDefaultNotice
386+
noticeFile = { oss, jdk ->
387+
copySpec {
388+
if (project.name == 'integ-test-zip') {
389+
from buildServerNotice
390+
} else {
391+
if (oss && jdk) {
392+
from buildOssNotice
393+
} else if (oss) {
394+
from buildOssNoJdkNotice
395+
} else if (jdk) {
396+
from buildDefaultNotice
397+
} else {
398+
from buildDefaultNoJdkNotice
399+
}
400+
}
385401
}
386402
}
387403

0 commit comments

Comments
 (0)