-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathbuild.gradle
99 lines (85 loc) · 2.74 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
apply plugin: 'scala'
apply plugin: 'maven'
apply plugin: 'docker'
apply plugin: 'com.github.maiflai.scalatest'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: "com.gorylenko.gradle-git-properties"
ext {
scalaMajorVersion = '2.11'
scala = '2.11.7'
scalaTestVersion = '3.0.1'
scalaLoggingVersion = '2.1.2'
kafkaVersion = '0.10.2.0'
avroVersion = '1.7.7'
slf4jVersion = "1.7.21"
confluentVersion = '3.2.0'
pathikritVersion = '2.16.0'
ftpserverVersion = '1.0.6'
commonsNetVersion = '3.5'
commonsCodecVersion = '1.10'
mockitoVersion = '1.8.4'
pegdownVersion = '1.4.2'
}
compileScala {
scalaCompileOptions.additionalParameters = ["-feature", "-Xexperimental", "-language:implicitConversions"]
}
dependencies {
compile "org.scala-lang:scala-library:$scala"
compile "com.typesafe.scala-logging:scala-logging-slf4j_$scalaMajorVersion:$scalaLoggingVersion"
compile "org.apache.kafka:connect-api:$kafkaVersion"
compile "com.github.pathikrit:better-files_2.11:$pathikritVersion"
compile "org.apache.ftpserver:ftpserver-core:$ftpserverVersion"
compile "commons-net:commons-net:$commonsNetVersion"
compile "commons-codec:commons-codec:$commonsCodecVersion"
testCompile "org.scalatest:scalatest_$scalaMajorVersion:$scalaTestVersion"
testCompile "org.mockito:mockito-all:$mockitoVersion"
testRuntime "org.pegdown:pegdown:$pegdownVersion"
testRuntime "org.slf4j:slf4j-log4j12:$slf4jVersion"
}
repositories {
mavenLocal()
mavenCentral()
maven { url "http://packages.confluent.io/maven/" }
maven { url "http://repo.typesafe.com/typesafe/releases/" }
}
buildscript {
repositories {
jcenter()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath "com.github.maiflai:gradle-scalatest:0.14"
classpath 'se.transmode.gradle:gradle-docker:1.2'
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
classpath "gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:1.4.17"
}
}
configurations.compile {
exclude group: 'org.slf4j', module: 'log4j-over-slf4j'
}
/*
* Gets the version name from the latest Git tag
*/
def getVersionName = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags'
standardOutput = stdout
}
return stdout.toString().trim()
}
version = getVersionName()
docker {
baseImage 'eneco/kafka-connect-base:0.1.0'
maintainer 'Eneco Dev'
}
shadowJar{
dependsOn test
}
group = "eneco"
task buildDocker(type: Docker) {
addFile("build/libs/$project.name-$version-all.jar","/usr/local/share/java/$project.name-$version-all.jar")
dependsOn shadowJar
}