-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
118 lines (95 loc) · 2.49 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
buildscript {
ext {
javaVersion = "1.8"
slf4jVersion = "1.7.25"
kotlinVersion = "1.3.40"
}
}
plugins {
id "idea"
id "eclipse"
id "com.avast.gradle.docker-compose" version "0.6.13"
id "org.jetbrains.kotlin.jvm" version "1.2.41" apply false
id "com.github.johnrengelman.shadow" version "2.0.2" apply false
}
allprojects { p ->
group = "daggerok"
version = "0.0.1"
apply plugin: "base"
apply plugin: "maven-publish"
defaultTasks "clean", "build", "publish", "installDist", "distZip"
clean.doFirst {
["out"].each {
delete "$projectDir/$it"
}
}
}
subprojects { sp ->
apply plugin: "java"
sourceCompatibility = targetCompatibility = "$javaVersion"
apply plugin: "kotlin"
compileKotlin {
incremental = true
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "$javaVersion"
}
}
compileTestKotlin {
incremental = true
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "$javaVersion"
}
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
// compile("org.slf4j:slf4j-jdk14:$slf4jVersion")
compile("org.slf4j:slf4j-api:$slf4jVersion")
compile("org.slf4j:jul-to-slf4j:$slf4jVersion")
compile("org.slf4j:log4j-over-slf4j:$slf4jVersion")
compile("ch.qos.logback:logback-classic:1.2.3")
// Kotlin
compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.4.1")
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
compile("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
}
apply plugin: "com.github.johnrengelman.shadow"
shadowJar.mustRunAfter jar
publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
}
}
repositories {
maven {
url "$buildDir/maven-publish"
}
}
}
apply plugin: "application"
mainClassName = "daggerok.AppKt"
}
def profile = project.hasProperty("profile") ? project.getProperty("profile") : "gradle"
dockerCompose {
useComposeFiles = [project.file("docker-compose-${profile}.yaml")]
// captureContainersOutput = true
captureContainersOutput = false
stopContainers = true
removeContainers = true
removeImages = "Local"
removeVolumes = true
removeOrphans = true
forceRecreate = true
waitForTcpPorts = false
projectName = project.name
}
composeUp.dependsOn assemble
task wrapper(type: Wrapper) {
gradleVersion = "4.7"
distributionType = "ALL"
}