-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathbuild.gradle.kts
141 lines (117 loc) · 5.42 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
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "2.4.5" apply false
id("io.spring.dependency-management") version "1.0.11.RELEASE"
id("org.jetbrains.kotlin.plugin.noarg") version "1.4.21"
kotlin("jvm") version "1.4.32"
kotlin("plugin.spring") version "1.4.32" apply false
kotlin("plugin.jpa") version "1.4.32" apply false
kotlin("kapt") version "1.4.32"
id("org.jetbrains.dokka") version "1.4.32"
id("net.ltgt.apt") version "0.15"
}
group = "com.qingzhu"
version = "1.0.0-SNAPSHOT"
allprojects {
repositories {
mavenCentral()
maven { url = uri("https://maven.aliyun.com/repository/public") }
maven { url = uri("https://maven.aliyun.com/repository/spring") }
maven { url = uri("https://repo.spring.io/milestone") }
maven { url = uri("https://dl.bintray.com/arrow-kt/arrow-kt/") }
}
}
subprojects {
apply(plugin = "java")
apply(plugin = "org.springframework.boot")
apply(plugin = "io.spring.dependency-management")
apply(plugin = "org.jetbrains.kotlin.plugin.noarg")
apply(plugin = "kotlin")
apply(plugin = "kotlin-kapt")
apply(plugin = "org.jetbrains.dokka")
apply(plugin = "net.ltgt.apt-idea")
noArg {
annotation("com.qingzhu.common.constant.NoArg")
}
java.sourceCompatibility = JavaVersion.VERSION_11
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
extra["springCloudVersion"] = "2020.0.2"
extra["springDataBom"] = "2020.0.3"
val arrowVersion = "0.11.0"
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "11"
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
dependencyManagement {
imports {
mavenBom("org.springframework.cloud:spring-cloud-dependencies:${property("springCloudVersion")}")
mavenBom("org.springframework.data:spring-data-bom:${property("springDataBom")}")
mavenBom("io.arrow-kt:arrow-stack:$arrowVersion")
// mavenBom("io.r2dbc:r2dbc-bom:Arabba-SR8")
}
}
dependencies {
// Kotlin
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
// Functional Programming in Kotlin
implementation("io.arrow-kt:arrow-core")
implementation("io.arrow-kt:arrow-fx")
implementation("io.arrow-kt:arrow-fx-coroutines")
implementation("io.arrow-kt:arrow-optics")
implementation("io.arrow-kt:arrow-syntax")
implementation("io.arrow-kt:arrow-aql")
kapt("io.arrow-kt:arrow-meta")
// jackson
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-properties")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
implementation("org.zalando:problem-spring-webflux:0.26.2")
// spring
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-webflux")
// spring cloud
implementation("org.springframework.cloud:spring-cloud-starter-loadbalancer")
implementation("org.springframework.cloud:spring-cloud-starter-consul-discovery")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-devtools")
// jpa postgresql
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-data-r2dbc")
runtimeOnly("io.r2dbc:r2dbc-postgresql")
runtimeOnly("org.postgresql:postgresql")
// security
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.security:spring-security-oauth2-resource-server")
implementation("org.springframework.security:spring-security-oauth2-client")
implementation("org.springframework.security:spring-security-oauth2-jose")
// mapstruct
implementation("org.mapstruct:mapstruct:1.4.1.Final")
kapt("org.mapstruct:mapstruct-processor:1.4.1.Final")
kaptTest("org.mapstruct:mapstruct-processor:1.4.1.Final")
kapt("org.springframework.boot:spring-boot-configuration-processor")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("io.projectreactor:reactor-test")
testImplementation("org.springframework.cloud:spring-cloud-starter-contract-verifier")
// testImplementation("org.springframework.cloud:spring-cloud-stream-test-support")
testImplementation("org.springframework.cloud:spring-cloud-stream")
testImplementation("com.squareup.okhttp3:mockwebserver")
// testRuntimeOnly("com.squareup.okhttp3:mockwebserver3-junit5:4.9.0")
}
}