-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
137 lines (115 loc) · 4.55 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
buildscript {
ext.kotlin_version = '1.2.0'
ext.jetty_version = '9.4.8.v20171121'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id "com.moowork.node" version "1.2.0"
}
// Apply the java-library plugin to add support for Java Library
apply plugin: 'java-library'
apply plugin: 'kotlin'
apply plugin: 'java'
apply plugin: 'java-library-distribution'
group = "net.squarelabs"
version = "0.1." + (System.getenv("TRAVIS_BUILD_NUMBER") ? System.getenv("TRAVIS_BUILD_NUMBER") : 0)
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
api 'org.apache.commons:commons-math3:3.6.1'
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:23.0'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile 'org.postgresql:postgresql:42.1.4'
compile 'javax.websocket:javax.websocket-api:1.1'
compile 'org.eclipse.jetty:jetty-server:9.4.8.v20171121'
compile 'org.eclipse.jetty.websocket:websocket-server:9.4.8.v20171121'
compile 'org.eclipse.jetty.websocket:websocket-servlet:9.4.8.v20171121'
compile 'org.eclipse.jetty.websocket:javax-websocket-server-impl:9.4.8.v20171121'
compile group: 'org.eclipse.jetty.websocket', name: 'websocket-client', version: '9.4.8.v20171121'
compile group: 'org.flywaydb', name: 'flyway-core', version: '4.2.0'
compile 'com.github.javafaker:javafaker:0.14'
compile group: 'com.google.inject', name: 'guice', version: '4.1.0'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.2'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.2'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.2'
compile group: 'com.zaxxer', name: 'HikariCP', version: '2.6.1'
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
compile group: 'javax.persistence', name: 'persistence-api', version: '1.0.2'
compile group: 'org.apache.kafka', name: 'kafka-clients', version: '1.0.0'
compile 'io.dropwizard.metrics:metrics-core:4.0.0'
compile 'io.dropwizard.metrics:metrics-jmx:4.0.0'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
testCompile group: 'org.seleniumhq.selenium', name: 'selenium-chrome-driver', version: '3.5.3'
testCompile group: 'org.seleniumhq.selenium', name: 'selenium-support', version: '3.5.3'
testCompile('org.seleniumhq.selenium:selenium-remote-driver:3.5.3')
testCompile('org.seleniumhq.selenium:selenium-api:3.5.3')
testCompile "org.seleniumhq.selenium:htmlunit-driver:2.27"
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
}
task wrapper(type: Wrapper) {
gradleVersion = '4.2'
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
node {
download = false
npmWorkDir = file("${project.buildDir}/npm")
nodeModulesDir = file("${project.projectDir}/client")
}
clean.doFirst {
delete "${rootDir}/src/main/resources/static/"
}
task copyResources(type: Copy) {
from 'client/build/' into 'src/main/resources/static'
}
task setVersion(type: Exec) {
executable "sh"
args "-c", "cd client && echo $version && npm version --allow-same-version $version && cd .."
}
npm_run_build.dependsOn setVersion
copyResources.dependsOn npm_run_build
processResources.dependsOn copyResources
test.outputs.upToDateWhen { false }
test {
testLogging {
showStandardStreams = true
showExceptions = true
showCauses = true
showStackTraces = true
showExceptions = true
displayGranularity = -1
exceptionFormat = "full"
}
}
//create a single Jar with all dependencies
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'Gradle Jar File Example',
'Implementation-Version': '0.1',
'Main-Class': 'net.squarelabs.pgrepl.MainKt'
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}