forked from yetisno/HTTPCacheServer
/
build.gradle
79 lines (67 loc) · 2.19 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
group 'org.yetiz.serv'
version '1.0'
apply plugin: 'java'
apply plugin: 'idea'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'io.netty:netty-all:4.0.34.Final'
// for Logging - start
compile 'org.slf4j:slf4j-api:1.7.12'
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.3'
compile 'org.apache.logging.log4j:log4j-api:2.3'
compile 'org.apache.logging.log4j:log4j-core:2.3'
compile 'com.fasterxml.jackson.core:jackson-core:2.6.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.6.1'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.6.1'
// for Logging - end
testCompile 'org.mockito:mockito-all:1.10.19'
testCompile 'com.ning:async-http-client:1.9.33'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'net.sf.proguard:proguard-gradle:5.2.1'
}
}
def manifestMainClass = 'Launcher'
def manifestImplementationVersion = "${version}"
def manifestBuiltDate = System.currentTimeMillis()
def manifestClassPath = configurations.compile.collect { "libs${File.separator}${it.getName()}" }.join(' ')
task export_library(type: Copy) {
into "$buildDir${File.separator}output${File.separator}libs"
from configurations.runtime
}
jar {
dependsOn export_library
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
destinationDir file("$buildDir${File.separator}output/")
from sourceSets.main.allSource
}
task manifastJar(type: Jar, dependsOn: sourcesJar) {
archiveName = "$baseName-$version.$extension"
destinationDir file("$buildDir${File.separator}output/")
from files(sourceSets.main.output.classesDir)
from files(sourceSets.main.output.resourcesDir)
manifest {
attributes 'Main-Class': manifestMainClass,
'Implementation-Version': manifestImplementationVersion,
'Built-Date': manifestBuiltDate,
"Class-Path": manifestClassPath
}
}
artifacts {
archives manifastJar
}