-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
156 lines (140 loc) · 4.63 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.3.50'
id "org.gradle.java.experimental-jigsaw" version "0.1.1"
id 'java-library'
// id 'war'
id 'idea'
// id 'application'
id 'maven-publish'
//id 'org.akhikhl.gretty' version "2.0.0"
}
group 'com.voidgeek'
version '1.0'
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
destinationDir = new File(buildDir, "explodedWar/WEB-INF/classes")
}
sourceCompatibility = 8
//javaModule.name = 'org.voidgeek.tms'
repositories {
mavenLocal()
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
maven { url "https://plugins.gradle.org/m2/" }
mavenCentral()
}
dependencies {
implementation 'org.netbeans.external:com-jcraft-jsch:RELEASE124'
// https://mvnrepository.com/artifact/org.luaj/luaj-jse
compile group: 'org.luaj', name: 'luaj-jse', version: '3.0.1'
compileOnly 'org.graalvm.truffle:truffle-api:19.0.2'
compileOnly 'org.graalvm.js:js:19.0.2'
compileOnly 'org.graalvm.js:js-scriptengine:19.0.2'
compileOnly 'org.graalvm.sdk:graal-sdk:19.0.2'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.10.1'
//runtime 'org.graalvm.tools:profiler:19.0.2'
//runtime 'org.graalvm.tools:chromeinspector:19.0.2'
// compileOnly "org.akhikhl.gretty:org.akhikhl.gretty:2.0.0"
compile 'org.springframework:spring-webmvc:5.0.10.RELEASE'
//compile'com.voidgeek:ChatRobot:1.0-SNAPSHOT'
compile 'org.jetbrains.kotlin:kotlin-reflect:1.3.10'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.10"
compile 'net.java.dev.jna:jna:5.4.0'
compile 'net.java.dev.jna:jna-platform:5.4.0'
//https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-servlet
compile group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.4.14.v20181114'
// https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-webapp
compile group: 'org.eclipse.jetty', name: 'jetty-webapp', version: '9.4.14.v20181114'
// https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api
compile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
// https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-annotations
compile group: 'org.eclipse.jetty', name: 'jetty-annotations', version: '9.4.14.v20181114'
// https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-deploy
testCompile group: 'junit', name: 'junit', version: '4.12'
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
//gretty {
// afterEvaluate {
// appStartDebug {//修改debug时的监听端口,默认使用5005端口
// debugPort = 5005 //此处填写端口号,如8080,如果修改端口号,则IDEA中的Remote 调试工具中需要填写相同的端口
// debugSuspend = true
// }
// }
// scanDir{
// "${project.buildDir}/src/main/kotlin"
// }
// httpPort = 8080
// // 'jetty7', 'jetty8', 'jetty9', 'jetty93', 'jetty94', 'tomcat7', 'tomcat8'
// servletContainer = 'jetty9'
// contextPath = '/'
//}
//mainClassName = 'blockman.server.app.AppServer'
//applicationDefaultJvmArgs = ['-Dfile.encoding=UTF-8']
jar {
manifestContentCharset 'utf-8'
metadataCharset 'utf-8'
manifest {
attributes (
"Main-Class": "blockman.server.app.Cli",
"Manifest-Version": 1.0,
)
}
archivesBaseName = 'VmClient'//基本的文件名
archiveVersion = '0.0.3' //版本
//打包依赖包
from {
(configurations.runtimeClasspath).collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
//sourceSets.main.resources.srcDirs = [
// //"src/main/java"
// "src/main/resources",
//// "src/main/kotlin"
//]
//task createdirs {
// doLast {
// sourceSets*.java.srcDirs*.each {
// it.mkdirs()
// }
// sourcScts*.resources.srcDirs*.each{
// it.midirs()
// }
// }
//
//}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.javaParameters=true
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileJava {
//dependsOn('compileKotlin')
doFirst {
options.compilerArgs = [
'--module-path',classpath.asPath,
]
classpath = files()
}
}
task nestedSpecs(type: Copy) {
into "$buildDir/explodedWar"
exclude '**/*staging*'
from(sourceSets.main.resources)
{
into 'WEB-INF/classes'
}
// from(sourceSets.main.output) {
// into 'WEB-INF/classes'
// }
into('WEB-INF/lib') {
from configurations.runtimeClasspath
}
}
build{
doFirst {nestedSpecs}
}