-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathbuild.gradle
88 lines (70 loc) · 2.36 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
buildscript {
ext.fasterxml_version = '2.9.5'
}
plugins {
id "org.jetbrains.kotlin.jvm" version "1.2.51"
id 'org.springframework.boot' version '2.0.1.RELEASE'
id "jacoco"
}
apply plugin: 'idea'
apply plugin: 'io.spring.dependency-management'
apply from: "$rootDir/gradle/versioning.gradle"
group = 'jalgoarena'
description = """JAlgoArena Submissions"""
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
jar {
baseName = 'jalgoarena-submissions'
}
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Finchley.RELEASE'
}
}
dependencies {
compile "com.fasterxml.jackson.core:jackson-databind:$fasterxml_version",
"com.fasterxml.jackson.core:jackson-core:$fasterxml_version",
"com.fasterxml.jackson.core:jackson-annotations:$fasterxml_version",
"com.fasterxml.jackson.module:jackson-module-kotlin:$fasterxml_version",
"org.springframework.kafka:spring-kafka",
"org.springframework.boot:spring-boot-starter-webflux",
"org.springframework.boot:spring-boot-starter-actuator",
"org.jetbrains.kotlin:kotlin-stdlib",
'net.logstash.logback:logstash-logback-encoder:5.1',
'org.springframework.boot:spring-boot-starter-data-jpa',
'org.postgresql:postgresql'
testCompile 'junit:junit:4.12',
'pl.pragmatists:JUnitParams:1.0.5',
"org.springframework.kafka:spring-kafka-test:2.1.4.RELEASE",
"org.springframework.boot:spring-boot-starter-test",
'com.nhaarman:mockito-kotlin-kt1.1:1.5.0',
"com.h2database:h2"
}
apply plugin: 'jacoco'
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
check.dependsOn jacocoTestReport
defaultTasks 'clean', 'bootJar'
task stage {
dependsOn 'bootJar'
}
task releaseZip(type: Zip, dependsOn: 'bootJar') {
from('build/libs/') {
include('*.jar')
}
from 'run.sh'
archiveName "JAlgoArena-Submissions-${version}.zip"
destinationDir(file('build/libs'))
}
task buildDockerImage(type: Exec, dependsOn: 'bootJar') {
commandLine 'docker', 'build', '-t', "jalgoarena/submissions:${version}", '.'
}
task pushDockerImages(type: Exec, dependsOn: 'buildDockerImage') {
commandLine 'docker', 'push', "jalgoarena/submissions:${version}"
}