Skip to content

Commit

Permalink
Add README.JAVASE to builds by default, with flag to exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
benty-amzn committed Oct 5, 2023
1 parent dba51a2 commit be4409e
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 27 deletions.
4 changes: 4 additions & 0 deletions README.JAVASE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This is an intermediate build made available for testing purposes only.
The code is untested and presumed incompatible with the Java SE Specification.
You should not deploy or write to this code, but instead use a tested and certified Java SE compatible version of the code.
Redistribution of this build must retain this notice.
18 changes: 15 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ allprojects {
"--with-vendor-version-string=Corretto-${project.version.full}"
]

// If this is a certified release build, exclude the README.JAVASE file
excludeReadmeJavaSE = Boolean.parseBoolean(project.findProperty("corretto.excludeReadmeJavaSE"))
rootFiles = ['ADDITIONAL_LICENSE_INFO', 'ASSEMBLY_EXCEPTION', 'LICENSE', 'README.md', 'commitId.txt', 'version.txt']
if (!excludeReadmeJavaSE) {
rootFiles += 'README.JAVASE'
}

// If the version opt is empty, then the JDK will set to 'adhoc.<username>.<base dir name>'
versionOpt = project.findProperty("corretto.versionOpt") ?: "FR" // Set the LTS when needed
correttoCommonFlags += ["--with-version-opt=${versionOpt}"]
Expand Down Expand Up @@ -278,8 +285,7 @@ project(':openjdksrc') {
description 'Assemble source files required for building and distributing Corretto.'
compression Compression.GZIP
archiveName sourceTar
from fileTree(rootDir) {
include 'LICENSE',
def sourceTarRootFiles = ['LICENSE',
'ADDITIONAL_LICENSE_INFO',
'README',
'README.md',
Expand All @@ -293,7 +299,13 @@ project(':openjdksrc') {
'doc/**',
'make/**',
'src/**',
'test/**'
'test/**']
if (!excludeReadmeJavaSE) {
sourceTarRootFiles += 'README.JAVASE'
}

from fileTree(rootDir) {
include sourceTarRootFiles
}
}

Expand Down
7 changes: 1 addition & 6 deletions installers/linux/alpine/tar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,7 @@ task packageBuildResults(type: Tar) {
archiveName "amazon-corretto-${project.version.full}-alpine-linux-${arch_alias}.tar.gz"
compression Compression.GZIP
from(buildRoot) {
include 'ADDITIONAL_LICENSE_INFO'
include 'ASSEMBLY_EXCEPTION'
include 'LICENSE'
include 'README.md'
include 'commitId.txt'
include 'version.txt'
include project.rootFiles
}
from(jdkResultingImage) {
include 'bin/**'
Expand Down
7 changes: 1 addition & 6 deletions installers/linux/universal/tar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,7 @@ task packageBuildResults(type: Tar) {
archiveName "${project.correttoJdkArchiveName}.tar.gz"
compression Compression.GZIP
from(buildRoot) {
include 'ADDITIONAL_LICENSE_INFO'
include 'ASSEMBLY_EXCEPTION'
include 'LICENSE'
include 'README.md'
include 'commitId.txt'
include 'version.txt'
include project.rootFiles
into project.correttoJdkArchiveName
}
from(jdkResultingImage) {
Expand Down
7 changes: 1 addition & 6 deletions installers/mac/tar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,7 @@ task prepareArtifacts {
exclude "Contents/Home/**/*.diz"
}
from(buildRoot) {
include 'ADDITIONAL_LICENSE_INFO'
include 'ASSEMBLY_EXCEPTION'
include 'LICENSE'
include 'README.md'
include 'commitId.txt'
include 'version.txt'
include project.rootFiles
into "Contents/Home"
}
into "${buildDir}/${correttoMacDir}"
Expand Down
8 changes: 2 additions & 6 deletions installers/windows/zip/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,9 @@ task packageBuildResults(type: Zip) {
exclude 'demo'
exclude '**/*.diz'
}

from(buildRoot) {
include 'ADDITIONAL_LICENSE_INFO'
include 'ASSEMBLY_EXCEPTION'
include 'LICENSE'
include 'README.md'
include 'commitId.txt'
include 'version.txt'
include project.rootFiles
}
}

Expand Down

0 comments on commit be4409e

Please sign in to comment.