forked from spring-projects-experimental/spring-fu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
80 lines (69 loc) · 1.96 KB
/
build.gradle.kts
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
import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.jetbrains.kotlin.jvm") version "1.3.0-rc-116"
id("org.springframework.boot") version "2.1.0.M4" apply false
id("io.spring.dependency-management") version "1.0.6.RELEASE"
id("maven-publish")
id("org.jetbrains.dokka") version "0.9.17" apply false
}
allprojects {
apply {
plugin("org.jetbrains.kotlin.jvm")
plugin("maven-publish")
plugin("java-library")
plugin("io.spring.dependency-management")
}
version = "0.0.3.BUILD-SNAPSHOT"
group = "org.springframework.fu"
publishing {
repositories {
val repoUsername: String? by project
val repoPassword: String? by project
maven {
if (repoUsername != null && repoPassword != null) {
credentials {
username = repoUsername
password = repoPassword
}
url = uri(
if (version.toString().endsWith(".BUILD-SNAPSHOT")) "https://repo.spring.io/libs-snapshot-local/"
else "https://repo.spring.io/libs-milestone-local/"
)
} else {
url = uri("$buildDir/repo")
}
}
}
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xjsr305=strict", "-Xjvm-default=enable")
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
repositories {
mavenCentral()
maven("https://repo.spring.io/milestone")
maven("http://dl.bintray.com/kotlin/kotlin-eap")
maven("https://jcenter.bintray.com")
}
dependencyManagement {
val bootVersion: String by project
val coroutinesVersion: String by project
imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:$bootVersion")
}
dependencies {
dependency("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
dependency("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:$coroutinesVersion")
}
}
configurations.all {
exclude(module = "javax.annotation-api")
exclude(module = "hibernate-validator")
}
}