forked from corretto/corretto-8
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
92 lines (84 loc) · 3.68 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/*
* Copyright (c) 2018, Amazon.com, Inc. or its affiliates. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Amazon designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
// Tasks can refer to version information using the project.version
// property. For an example of its usage, see ':installers:linux:rpm:buildLogic'
// where the version numbers are used to populate a templated RPM spec file.
allprojects {
apply plugin: 'base'
configurations {
compile {
transitive = false
}
}
version = {
def full = file('version.txt').text.trim()
def tokens = full.tokenize(".")
[full : full,
major : tokens[0],
update : tokens[1],
build : tokens[2],
revision: tokens[3],
upstream: "1.${tokens[0]}.0_${tokens[1]}.b${tokens[2]}"]
}.call()
buildDir = 'corretto-build'
ext {
buildRoot = file("$buildDir/buildRoot")
distributionDir = file("$buildDir/distributions")
packageInfo = [
url : "https://github.com/corretto/corretto-${project.version.major}",
vendor : 'Amazon',
packager : 'Amazon',
license : 'ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with ' +
'exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib.',
maintainer: 'Amazon Corretto Team <[email protected]>',
buildHost : 'build.amazon.com'
]
jdkTools = ['javac', 'appletviewer', 'extcheck', 'extcheck', 'jar', 'jarsigner', 'java-rmi.cgi', 'javadoc',
'javah', 'javap', 'jcmd', 'jconsole', 'jdb', 'jdeps', 'jhat', 'jinfo', 'jmap', 'jps', 'jrunscript',
'jsadebugd', 'jstack', 'jstat', 'jstatd', 'native2ascii', 'rmic', 'schemagen', 'serialver',
'wsgen', 'wsimport', 'xjc']
jreTools = ['java', 'jjs', 'keytool', 'orbd', 'pack200', 'policytool', 'rmid', 'rmiregistry',
'servertool', 'tnameserv', 'unpack200']
}
}
project(':openjdksrc') {
/**
* Compresses a snapshot of the source code used to perform the build.
*/
task sourceDistributionTarball(type: Tar) {
description 'Assemble source files required for building and distributing Corretto.'
compression Compression.GZIP
archiveName "amazon-corretto-source-${project.version.full}.tar.gz"
from fileTree(rootDir) {
include 'src/**'
exclude 'src/corretto-build/**'
include 'LICENSE',
'README.md',
'THIRD_PARTY_README',
'ASSEMBLY_EXCEPTION',
'version.txt',
'cacerts'
}
}
artifacts {
archives sourceDistributionTarball
}
}