-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
65 lines (52 loc) · 1.52 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
plugins {
id 'java'
id 'application' //adds the run task. also add Application {main-class}
// id 'java-library' //adds api command!
id "me.champeau.jmh" version "0.6.7" //jmh benchmarking plugin
}
group 'org.core'
version '1.0-SNAPSHOT'
java.sourceCompatibility JavaVersion.VERSION_17
/* for multiple modules, inject into related build.gradle
* add below to use 'java -jar ..' command!
* else use 'gradle run' or 'java -cp ...jar className'
*/
jar {
manifest {
attributes('Implementation-Title': 'java stream sandbox',
'Implementation-Version': archiveVersion,
// 'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': 'org.core.Main')
}
}
// for gradle run task
// Define the (full path) main class for the application.
application {
mainClass = 'org.core.Main'
}
repositories {
mavenCentral()
}
dependencies {
//src folder
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
//for src.jmh folder.. package names must be same!
jmh 'org.openjdk.jmh:jmh-core:1.35'
jmh 'org.openjdk.jmh:jmh-generator-annprocess:1.35'
//that solves the missing /META-INF/BenchmarkList error
jmhAnnotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.35'
}
test {
//for junit5
useJUnitPlatform()
}
/*
* custom task definition
* register first, then define
*/
tasks.register('hi') {
description 'to see some parameter values'
println "hi"
println ant
println buildDir
}