This repository has been archived by the owner on May 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 84
/
build.gradle
126 lines (103 loc) · 3.17 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
group 'com.github.pgutkowski'
version '0.3.0'
buildscript {
ext.kotlin_version = '1.3.10'
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "me.champeau.gradle:jmh-gradle-plugin:0.4.7"
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.1"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1'
}
}
apply plugin: 'kotlin'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'me.champeau.gradle.jmh'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: "com.jfrog.bintray"
repositories {
mavenCentral()
jcenter()
maven {
url "http://dl.bintray.com/kotlin/kotlin-eap"
}
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.0'
compile "com.fasterxml.jackson.core:jackson-databind:2.9.7"
compile "com.fasterxml.jackson.module:jackson-module-kotlin:2.9.7"
compile "com.github.ben-manes.caffeine:caffeine:1.0.0"
testCompile "org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.3"
testCompile "io.netty:netty-all:4.1.9.Final"
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile "org.hamcrest:hamcrest-all:1.3"
}
jmh {
jmhVersion = '1.19'
duplicateClassesStrategy = 'warn'
}
coveralls {
sourceDirs += ['src/main/kotlin']
}
jacoco {
toolVersion = "0.8.2"
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
}
jacocoTestReport {
reports {
xml.destination file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml")
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact sourceJar {
classifier "sources"
}
pom.withXml {
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'compile'
}
}
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
pkg {
repo = 'Maven'
name = 'KGraphQL'
licenses = ['MIT']
vcsUrl = 'https://github.com/pgutkowski/KGraphQL.git'
publications = ['MyPublication']
version {
name = '0.3.0'
desc = 'KGraphQL beta release'
released = new Date()
vcsTag = '0.3.0'
}
}
}
wrapper {
gradleVersion = '4.10' //version required
}