forked from oracle/graalvm-reachability-metadata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
50 lines (45 loc) · 1.43 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
/*
* Copyright and related rights waived via CC0
*
* You should have received a copy of the CC0 legalcode along with this
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
plugins {
id 'base'
id "com.diffplug.spotless" version "6.3.0"
id "org.graalvm.internal.tck-harness"
}
allprojects {
repositories {
mavenCentral()
mavenLocal()
}
}
// NOTE: this version serves only as a placeholder and will be overridden by the CI when creating a new release
project.version("1.0.0-SNAPSHOT")
// gradle check
spotless {
json {
target(
tck.metadataRoot.map { it.toString() + '/**/*.json' }.get(),
tck.testRoot.map { it.toString() + '/**/*.json' }
)
targetExclude(
tck.testRoot.map { it.toString() + '/**/build/**/*.json' },
tck.repoRoot.map { it.toString() + '/.github/**/*.json' }
)
gson()
.indentWithSpaces(2)
.sortByKeys()
.version("2.9.0")
}
}
// gradle package
tasks.register('package', Zip) { task ->
String outputFileName = "graalvm-reachability-metadata-${project.version}.zip"
task.setDescription("Packages current repository to 'build/${outputFileName}'")
task.setGroup(PublishingPlugin.PUBLISH_TASK_GROUP)
task.archiveFileName = outputFileName
task.destinationDirectory = layout.buildDirectory
from(tck.metadataRoot)
}