-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
93 lines (76 loc) · 2.61 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
group 'vidsell-data-simulator'
version '1.0'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
tasks.withType(Jar) {
destinationDir = file("$rootDir/BUILD-OUTPUT")
}
dependencies {
//common libs for AOP and Spring core
compile (
fileTree(dir: 'lib', include: '**/*.jar')
,'javax.inject:javax.inject:1'
,'org.aspectj:aspectjrt:1.8.7'
,'org.aspectj:aspectjweaver:1.8.7'
,'org.reflections:reflections:0.9.10'
,'commons-dbcp:commons-dbcp:1.4'
)
// utils
compile group: 'com.google.code.gson', name: 'gson', version: '2.7'
compile group: 'org.apache.commons', name: 'commons-csv', version: '1.4'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.5'
compile group: 'log4j', name: 'log4j', version: '1.2.17'
//HTTP server for data communication
compile group: 'com.sparkjava', name: 'spark-core', version: '2.5.1'
// common database drivers
compile group: 'redis.clients', name: 'jedis', version: '2.9.0'
compile group: 'mysql', name: 'mysql-connector-java', version: '6.0.5'
//Spring Core framework and JDBC for RDBMS
compile group: 'org.springframework', name: 'spring-context', version: '4.3.3.RELEASE'
compile group: 'org.springframework', name: 'spring-aop', version: '4.3.3.RELEASE'
compile group: 'org.springframework', name: 'spring-jdbc', version: '4.3.3.RELEASE'
// HTTP Client for AutoBot
compile group: 'com.ning', name: 'async-http-client', version: '1.9.40'
}
def getClasspathStringJars() {
def baseFolder = 'deps/'
def fileNames = []
configurations.compile.each { File file -> fileNames.add(baseFolder + file.name) }
def classpath = fileNames.join(" ; ")
return '. ; ' + classpath + ' ; '
}
// copy dependency libs
task CopyRuntimeLibs(type: Copy) {
into "BUILD-OUTPUT/deps"
from configurations.compile
}
// copy configs
task CopyConfigs(type: Copy) {
into "BUILD-OUTPUT/configs"
from files('configs')
}
// copy shell-scripts
task CopyShellScripts(type: Copy) {
into "BUILD-OUTPUT"
from files('shell-scripts')
}
task buildVidsellDataSimulatorBot(type: Jar) {
dependsOn classes
from(sourceSets.main.output) {
include "**"
}
version = '1.0'
baseName = 'vidsell-data-simulator-bot'
manifest {
attributes ('Implementation-Title': 'AutoBotInstance',
'Implementation-Version': version ,
'Main-Class': 'com.rfxlab.vidsell.bot.VidsellDataSimulatorBot',
'Class-Path' : getClasspathStringJars()
)
}
}