48 lines
1.2 KiB
Groovy
48 lines
1.2 KiB
Groovy
plugins {
|
||
id 'java'
|
||
}
|
||
|
||
group 'com.global'
|
||
version '1.0.0-SNAPSHOT'
|
||
|
||
sourceCompatibility = 1.8
|
||
|
||
repositories {
|
||
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
|
||
mavenLocal()
|
||
mavenCentral()
|
||
}
|
||
|
||
|
||
jar {
|
||
baseName = 'globalserver'
|
||
version = '1.0.0'
|
||
manifest {
|
||
attributes 'Main-Class': 'com.global.GlobalServerApplication'
|
||
}
|
||
}
|
||
dependencies {
|
||
compile project(":hotfix")
|
||
testCompile group: 'junit', name: 'junit', version: '4.12'
|
||
compile("org.apache.thrift:libthrift:0.9.2")
|
||
compile("org.springframework.boot:spring-boot-starter-data-redis:1.5.9.RELEASE")
|
||
compile group: 'com.google.code.gson', name: 'gson', version: '2.2.4'
|
||
compile project(":gamecommon")
|
||
compile project(":tablemanager")
|
||
compile files("${System.properties['java.home']}/../lib/tools.jar")
|
||
}
|
||
|
||
//依赖编译,然后打包JAR
|
||
task taskJar(type:Jar, dependsOn: compileJava) {
|
||
from 'build/classes/main'
|
||
destinationDir = file('build/libs')
|
||
}
|
||
//删除lib中的jar
|
||
task clearJars(type:Delete){
|
||
delete 'lib'
|
||
}
|
||
|
||
task copyJars(type: Copy, dependsOn:clearJars) {
|
||
from configurations.runtime
|
||
into 'lib' // 目标位置
|
||
} |