This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
89 lines (77 loc) · 2.3 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
group 'org.tfelab'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'application'
sourceCompatibility = 1.8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
mainClassName = 'org.tfelab.stock_qs.Crawler'
//mainClassName = 'org.tfelab.stock_qs.ServiceWrapper'
applicationDefaultJvmArgs = ["-Xms200m", "-Xmx4000m", "-Dsun.net.inetaddr.ttl=-1", "-Djava.net.preferIPv4Stack=true", "-Dlog4j.configurationFile=log4j2.xml", "-Dfile.encoding=UTF8", "-Djdk.http.auth.tunneling.disabledSchemes=\"\""]
repositories {
jcenter()
maven {
url "http://repo.maven.apache.org/maven2"
}
maven {
url "http://tfelab.org:60002/content/groups/public"
credentials {
username developer
password developer_password
}
}
maven {
url "https://jitpack.io"
}
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: 'http://tfelab.org:60002/content/repositories/releases/') {
authentication(userName: deployment, password: deployment_password)
}
snapshotRepository(url: 'http://tfelab.org:60002/content/repositories/snapshots/') {
authentication(userName: deployment, password: deployment_password)
}
}
}
}
dependencies {
compile 'org.tfelab:core:1.0-20171201.113508-11'
compile 'io.netty:netty-all:4.1.17.Final'
testCompile group: 'junit', name: 'junit', version: '4.12'
runtime 'mysql:mysql-connector-java:5.1.37'
}
task copyFiles(group: 'tetra') << {
copy {
from 'chromedriver'
into 'src/main/dist'
}
copy {
from 'cacerts'
into 'src/main/dist'
}
copy {
from fileTree('src/main/resources')
into 'src/main/dist'
}
copy {
from fileTree('www')
into 'src/main/dist/www'
}
}
jar.dependsOn copyFiles
startScripts {
doLast {
def winScriptFile = file getWindowsScript()
def winFileText = winScriptFile.text
winFileText = winFileText.replaceAll('set CLASSPATH=.*', '@rem original CLASSPATH declaration replaced by:\nset CLASSPATH=%APP_HOME%\\\\lib\\\\\\*')
winFileText = winFileText.replaceAll('@rem Set local scope', '\n@ping 127.0.0.1 -n 3 >nul\n@rem Set local scope')
winScriptFile.text = winFileText
def unixScriptFile = file getUnixScript()
def unixFileText = unixScriptFile.text
unixFileText = unixFileText.replaceAll('APP_NAME', 'sleep 3\nexport DISPLAY=:99\nAPP_NAME')
unixScriptFile.text = unixFileText
}
}