-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
50 lines (43 loc) · 1.18 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
plugins {
id "java"
id "org.sglahn.gradle-dockerfile-plugin" version "0.5"
}
repositories {
mavenCentral()
}
version = "0.0.2"
sourceCompatibility = 1.8
dependencies {
compile "org.slf4j:slf4j-api:1.7.13"
compile "ch.qos.logback:logback-classic:1.2.3"
compile "io.netty:netty-all:4.1.42.Final"
compile "com.alibaba:fastjson:1.2.25.sec10"
compile "org.apache.commons:commons-lang3:3.3.2"
compile "org.apache.commons:commons-collections4:4.1"
compile "commons-io:commons-io:2.7"
compile "commons-codec:commons-codec:1.11"
compile "com.google.guava:guava:30.0-jre"
compile "com.beust:jcommander:1.72"
compile "com.typesafe:config:1.3.1"
compile "org.freemarker:freemarker:2.3.28"
compileOnly "org.projectlombok:lombok:1.18.2"
testCompile "junit:junit:4.13.1"
}
jar {
manifest {
attributes "Main-Class": "io.github.yangziwen.zyftp.run.FtpRunner"
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
task copyJar(type: Copy, dependsOn: build) {
from "$buildDir/libs/zy-ftp-${version}.jar"
into "$projectDir/target"
rename("zy-ftp-${version}.jar", "zy-ftp.jar")
}
docker {
tags = [version]
}
build.finalizedBy copyJar
dockerBuild.dependsOn copyJar