-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
70 lines (58 loc) · 1.75 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
/*
* This is a minimalistic Gradle build script to demonstrate proper integration with JMH. JMH includes corresponding
* Maven build scripts in the example project; see http://hg.openjdk.java.net/code-tools/jmh/file/86072ed4c056/jmh-samples/pom.xml
*/
//see https://github.com/johnrengelman/shadow
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.1'
}
}
plugins {
id 'idea'
id 'java'
id 'com.github.johnrengelman.shadow' version '1.2.1'
}
version = '0.1.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
// emulate scope 'provided' in Gradle - see http://blog.codeaholics.org/2012/emulating-mavens-provided-scope-in-gradle/
configurations {
provided
provided.extendsFrom(compile)
}
sourceSets {
main.compileClasspath += configurations.provided
test.compileClasspath += configurations.provided
test.runtimeClasspath += configurations.provided
}
repositories {
mavenCentral()
}
ext.jmhVersion = '1.7'
dependencies {
compile "org.openjdk.jmh:jmh-core:$jmhVersion"
provided "org.openjdk.jmh:jmh-generator-annprocess:$jmhVersion"
}
idea {
module {
// support provided scope in IDEA:
// See also http://www.gradle.org/docs/current/dsl/org.gradle.plugins.ide.idea.model.IdeaModule.html
scopes.PROVIDED.plus += [configurations.provided]
//avoid duplicate entries in provided scope (i.e. jmh-core)
//scopes.PROVIDED.minus += [configurations.compile]
//scopes.COMPILE.plus += [configurations.compile]
downloadSources = true
}
}
jar {
manifest {
attributes("Main-Class": "org.openjdk.jmh.Main")
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.2.1'
}