| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- plugins {
- id 'java'
- }
- group 'com.ljsd'
- version '1.0.0-SNAPSHOT'
- sourceCompatibility = 1.8
- repositories {
- mavenLocal()
- mavenCentral()
- }
- jar {
- baseName = 'serverlogic'
- version = '1.0.0'
- doFirst {
- manifest {
- attributes(
- 'Main-Class': 'com.ljsd.GameApplication',
- 'Class-Path': configurations.runtime.files.collect {
- "lib/" + it.name
- }.join(' ')
- )
- }
- }
- }
- dependencies {
- compile project(":netty")
- compile project(":hotfix")
- compile project(":common")
- compile project(":gamecommon")
- compile project(":tablemanager")
- compile project(":fightmanager")
- testCompile group: 'junit', name: 'junit', version: '4.12'
- compile("org.javassist:javassist:3.18.2-GA")
- compile("org.springframework.boot:spring-boot:1.5.9.RELEASE")
- compile("com.xuxueli:xxl-job-core:2.3.1")
- compile("org.springframework.boot:spring-boot-starter-test:1.5.9.RELEASE")
- compile("org.springframework.boot:spring-boot-starter-data-redis:1.5.9.RELEASE")
- compile("commons-io:commons-io:2.6")
- compile("io.netty:netty-all:4.1.6.Final")
- compile("com.google.protobuf:protobuf-java:2.5.0")
- compile("com.fasterxml.jackson.core:jackson-core:2.3.1")
- compile("com.fasterxml.jackson.core:jackson-databind:2.3.3")
- compile group: 'com.googlecode.protobuf-java-format', name: 'protobuf-java-format', version: '1.2'
- compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
- compile group: 'com.google.code.gson', name: 'gson', version: '2.2.4'
- compile group: 'cn.thinkingdata', name: 'thinkingdatasdk', version: '1.5.1'
- // compile("org.luaj:luaj-jse:3.0.1")
- compile("org.apache.thrift:libthrift:0.9.2")
- // compile group: 'com.carrotsearch', name: 'java-sizeof', version: '0.0.5';
- compile("com.alibaba:fastjson:1.2.47")
- compile("org.apache.httpcomponents:httpclient:4.5.3")
- 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 "$buildDir/libs/lib"
- }
- task copyJars(type: Copy, dependsOn:clearJars) {
- from configurations.runtime
- into "$buildDir/libs/lib"
- }
- task packageAll(dependsOn: ['clean', 'build', 'copyJars']) {
- group = 'build'
- description = 'Clean, build, and copy jars into build/libs/lib.'
- }
- [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|