-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
171 lines (129 loc) · 4.17 KB
/
build.gradle.kts
File metadata and controls
171 lines (129 loc) · 4.17 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
//import org.gradle.script.lang.kotlin.repositories
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.api.plugins.ExtensionAware
import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.dokka.gradle.DokkaTask
import org.junit.platform.gradle.plugin.FiltersExtension
import org.junit.platform.gradle.plugin.EnginesExtension
import org.junit.platform.gradle.plugin.JUnitPlatformExtension
import org.jetbrains.kotlin.gradle.dsl.Coroutines
project.group = "rockingboat.vertx.dataql.server"
project.version = "0.1-SNAPSHOT"
project.defaultTasks("run")
//mainClassName = "io.vertx.core.Launcher"
val mainVerticleName = "rockingboat.vertx.dataql.server.App"
buildscript {
var kotlinVersion: String by extra
kotlinVersion = "1.1.50"
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath("org.jfrog.buildinfo:build-info-extractor-gradle:latest.release")
classpath("org.jfrog.buildinfo:build-info-extractor-gradle:latest.release")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
classpath("com.github.jengelman.gradle.plugins:shadow:2.0.0")
classpath("org.junit.platform:junit-platform-gradle-plugin:1.0.0-M4")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:0.9.15")
}
}
plugins {
application
java
}
apply {
plugin("kotlin")
plugin("org.junit.platform.gradle.plugin")
}
repositories {
mavenCentral()
jcenter()
maven { setUrl("https://dl.bintray.com/rockingboat/maven") }
}
configure<JavaPluginConvention> {
setSourceCompatibility(1.8)
setTargetCompatibility(1.8)
}
java {
sourceSets {
"main" {
java {
srcDir(files("src"))
}
}
"test" {
java {
srcDir(files("tests"))
}
}
}
}
application {
mainClassName = "io.vertx.core.Launcher"
}
dependencies {
val kotlinVersion: String by extra
var vertxVersion: String by extra
var kodeinVersion: String by extra
var kotlinCoroutinsVersion: String by extra
vertxVersion = "3.4.2"
kodeinVersion = "4.1.0"
kotlinCoroutinsVersion = "0.18"
compile("io.vertx:vertx-core:$vertxVersion")
compile("io.vertx:vertx-lang-kotlin:$vertxVersion")
compile("io.vertx:vertx-web:$vertxVersion")
compile("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
compile("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
compile("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinsVersion")
compile("com.github.salomonbrys.kodein:kodein:$kodeinVersion")
compile("io.github.jupf.staticlog:staticlog:2.1.9")
compile("org.slf4j:slf4j-api:1.7.25")
compile("org.slf4j:slf4j-simple:1.7.25")
compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.0")
compile("rockingboat.vertx.helpers:web:0.8.2")
}
tasks.withType<Wrapper> {
gradleVersion = "4.2"
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
}
}
//tasks.withType<DokkaTask>() {
// outputFormat = "kotlin-website"
// outputDirectory = "${buildDir}/kws"
//}
//
//
//val shadowJar: ShadowJar by tasks
//shadowJar.apply {
// classifier = "fat"
// manifest.attributes.apply {
// put("Main-Verticle", mainVerticleName)
// put("Main-Class", application.mainClassName)
// }
//
// mergeServiceFiles {
// include("META-INF/services/io.vertx.core.spi.VerticleFactory")
// }
//
//}
//
fun JUnitPlatformExtension.filters(setup: FiltersExtension.() -> Unit) {
when (this) {
is ExtensionAware -> extensions.getByType(FiltersExtension::class.java).setup()
else -> throw Exception("${this::class} must be an instance of ExtensionAware")
}
}
fun FiltersExtension.engines(setup: EnginesExtension.() -> Unit) {
when (this) {
is ExtensionAware -> extensions.getByType(EnginesExtension::class.java).setup()
else -> throw Exception("${this::class} must be an instance of ExtensionAware")
}
}
//kotlin {
// experimental.coroutines = Coroutines.ENABLE
//}