-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.gradle
65 lines (52 loc) · 1.72 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
plugins {
id "org.jetbrains.kotlin.jvm" version "1.2.50"
id 'org.springframework.boot' version '2.0.1.RELEASE'
}
apply plugin: 'idea'
apply plugin: 'io.spring.dependency-management'
apply from: "$rootDir/gradle/versioning.gradle"
repositories {
mavenCentral()
}
jar {
baseName = 'jalgoarena-api'
}
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Finchley.RELEASE'
}
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib",
"org.jetbrains.kotlin:kotlin-reflect",
'org.springframework.boot:spring-boot-starter-webflux',
'org.springframework.boot:spring-boot-starter-actuator',
'org.springframework.cloud:spring-cloud-starter-netflix-zuul',
'net.logstash.logback:logstash-logback-encoder:5.1',
'org.springframework.cloud:spring-cloud-starter-consul-all'
}
defaultTasks 'clean', 'bootRepackage'
task stage {
dependsOn 'bootRepackage'
}
task releaseZip(type: Zip, dependsOn: 'bootRepackage') {
from('build/libs/') {
include('*.jar')
}
from 'run.sh'
archiveName "JAlgoArena-API-${version}.zip"
destinationDir(file('build/libs'))
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
task buildDockerImage(type: Exec, dependsOn: 'bootRepackage') {
commandLine 'docker', 'build', '-t', "spolnik/${rootProject.name}:latest", '-t', "spolnik/${rootProject.name}:${version}", '.'
}
task pushDockerImages(type: Exec, dependsOn: 'buildDockerImage') {
commandLine 'docker', 'push', "spolnik/${rootProject.name}:latest"
commandLine 'docker', 'push', "spolnik/${rootProject.name}:${version}"
}