-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
106 lines (92 loc) · 2.87 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version Versions.kotlin
kotlin("plugin.spring") version Versions.kotlin
kotlin("plugin.jpa") version Versions.kotlin
id("org.springframework.boot") version Versions.springBoot
id("org.jetbrains.dokka") version Versions.kotlin
id("io.spring.dependency-management") version "1.1.4"
}
allprojects {
group = "com.itinfo"
version = Versions.Project.OKESTRO
repositories {
mavenCentral()
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
tasks.withType<KotlinCompile> {
sourceCompatibility = Versions.java
targetCompatibility = Versions.java
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
}
}
}
subprojects {
afterEvaluate {
println("name: ${this.name}\tversion: ${this.version}\tdescription: ${this.description}")
}
apply(plugin="org.jetbrains.kotlin.jvm")
apply(plugin="org.jetbrains.dokka")
tasks.withType<JavaCompile> {
sourceCompatibility = Versions.java
targetCompatibility = Versions.java
options.encoding = "UTF-8"
options.isIncremental = true
}
tasks.withType<Test> {
useJUnitPlatform()
}
configurations {
all {
exclude("org.springframework.boot", "spring-boot-starter-logging")
}
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
val profile: String = if (project.hasProperty("profile")) project.property("profile") as? String ?: "local" else "local"
sourceSets {
main {
java.srcDirs(listOf("src/main/java", "src/main/kotlin"))
resources {
srcDirs("src/main/resources", "src/main/resources-$profile")
}
resources.srcDirs(listOf("src/main/resources"))
}
test {
java.srcDirs(listOf("src/test/java", "src/test/kotlin"))
resources.srcDirs(listOf("src/test/resources"))
}
}
tasks.compileJava { dependsOn(tasks.clean) }
tasks.compileKotlin { dependsOn(tasks.clean) }
tasks.processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
tasks.processTestResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
tasks.dokkaHtml {
dokkaSourceSets {
named("main") {
noAndroidSdkLink.set(false)
}
}
outputDirectory.set(file("../${[email protected]}-dokka"))
suppressInheritedMembers.set(true)
}
val cleanDokkaModuleDocs by tasks.register<Copy>("cleanDokkaModuleDocs") {
delete(file("${[email protected]}-dokka"))
}
}
/*
project("common") {
val jar: Jar by tasks
val bootJar: BootJar by tasks
bootJar.enabled = false
jar.enabled = true
}
*/