-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
89 lines (78 loc) · 2.33 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
plugins {
id 'application'
id 'java'
id 'me.champeau.jmh' version '0.6.8'
id 'org.jetbrains.kotlin.jvm' version '1.7.20'
id 'org.graalvm.buildtools.native' version '0.9.16'
}
repositories {
mavenCentral()
}
application {
mainClass = 'com.github.corneil.demos.EntitySorter'
}
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
testImplementation 'org.jetbrains.kotlin:kotlin-test'
jmhImplementation 'org.openjdk.jmh:jmh-core:1.35'
jmhImplementation 'org.openjdk.jmh:jmh-generator-annprocess:1.35'
jmhImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.20'
jmhImplementation 'org.jetbrains.kotlin:kotlin-reflect:1.7.20'
}
jmh {
duplicateClassesStrategy = DuplicatesStrategy.WARN
//includes = ['jmh']
resultFormat = 'CSV'
verbosity = logger.infoEnabled ? 'EXTRA' : 'NORMAL'
benchmarkMode = ['thrpt']
warmupIterations = 5
iterations = 5
threads = 1
fork = 1
}
defaultTasks 'check', 'jmh'
jmhJar {
manifest {
attributes 'Main-Class': 'com.github.corneil.demos.EntitySortRunner'
}
duplicatesStrategy = DuplicatesStrategy.WARN
}
assemble.dependsOn(jmhJar)
jar {
//task fatJar(type: Jar, dependsOn: [mainClasses]) {
// baseName "$project.name-fat"
manifest {
attributes 'Main-Class': 'com.github.corneil.demos.EntitySorter'
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
from collectReachabilityMetadata
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
graalvmNative {
toolchainDetection = false
metadataRepository {
enabled = true
}
metadataCopy {
outputDirectories.add("src/main/resources/META-INF/native-image")
mergeWithExisting = true
}
binaries {
main {
all {
resources.autodetect()
}
imageName = 'kip-grl'
useFatJar = true
mainClass = 'com.github.corneil.demos.EntitySorter'
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(17)
vendor = JvmVendorSpec.matching("GraalVM Community")
}
buildArgs.add('-H:+ReportUnsupportedElementsAtRuntime')
}
}
}