-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
90 lines (77 loc) · 2.65 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
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.9.7"
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.1.3-2'
}
apply plugin: 'com.gradle.plugin-publish'
apply plugin: 'kotlin'
apply plugin: 'eclipse'
repositories {
jcenter()
maven { url('http://repository.jetbrains.com/all') } //for Spek
}
version = projectVersion
group = 'io.morethan.jmhreport'
sourceCompatibility=1.7
targetCompatibility=1.7
dependencies {
compile(gradleApi())
compile(group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: '1.1.2-3')
testCompile(group: 'org.jetbrains.spek', name: 'spek', version: '1.0.9')
testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:2.3.0'
}
import org.gradle.plugins.ide.eclipse.model.*
eclipse {
project {
buildCommand 'org.jetbrains.kotlin.ui.kotlinBuilder'
natures 'org.jetbrains.kotlin.core.kotlinNature'
linkedResource (
name: 'kotlin_bin' ,
type: '2' ,
locationUri : 'org.jetbrains.kotlin.core.filesystem:/'+project.name+'/kotlin_bin'
)
}
classpath {
containers 'org.jetbrains.kotlin.core.KOTLIN_CONTAINER'
file {
whenMerged {Classpath cp ->
String gradleHome = gradle.getGradleHomeDir().absolutePath.replace(File.separator, '/')
println "Referencing for sources: $gradleHome"
String gradleSrc = "${gradleHome}/src"
cp.entries.each {ClasspathEntry entry ->
if ((entry in AbstractLibrary) && (entry.library.file.name.startsWith('gradle-'))) {
def matcher = entry.library.file.name =~ "gradle-(.*)-(.*)"
String sourcePath= gradleSrc + '/' + matcher[0][1];
entry.sourcePath = new org.gradle.plugins.ide.eclipse.model.internal.FileReferenceFactory().fromPath(sourcePath)
}
}
}
}
}
}
pluginBundle {
website = 'https://github.com/jzillmann/gradle-jmh-report'
vcsUrl = 'https://github.com/jzillmann/gradle-jmh-report'
description = 'A Gradle plugin building a visual report on top of your JMH benchmark results!'
tags = ['jmh', 'report', 'visualization']
plugins {
jmhReportPlugin {
id = group
displayName = 'JMH Report plugin'
}
}
}
// special wrapper setup for having the sources in eclipse
task wrapper(type: Wrapper) {
gradleVersion = '3.5'
distributionUrl = "https://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
}