build.gradle 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. plugins {
  2. id 'java'
  3. }
  4. group 'com.ljsd'
  5. version '1.0.0-SNAPSHOT'
  6. sourceCompatibility = 1.8
  7. repositories {
  8. mavenLocal()
  9. mavenCentral()
  10. }
  11. jar {
  12. baseName = 'serverlogic'
  13. version = '1.0.0'
  14. manifest {
  15. attributes 'Main-Class': 'com.ljsd.GameApplication'
  16. }
  17. }
  18. dependencies {
  19. compile project(":netty")
  20. compile project(":hotfix")
  21. compile project(":common")
  22. compile project(":gamecommon")
  23. compile project(":tablemanager")
  24. compile project(":fightmanager")
  25. testCompile group: 'junit', name: 'junit', version: '4.12'
  26. compile("org.javassist:javassist:3.18.2-GA")
  27. compile("org.springframework.boot:spring-boot:1.5.9.RELEASE")
  28. compile("com.xuxueli:xxl-job-core:2.3.1")
  29. compile("org.springframework.boot:spring-boot-starter-test:1.5.9.RELEASE")
  30. compile("org.springframework.boot:spring-boot-starter-data-redis:1.5.9.RELEASE")
  31. compile("commons-io:commons-io:2.6")
  32. compile("io.netty:netty-all:4.1.6.Final")
  33. compile("com.google.protobuf:protobuf-java:2.5.0")
  34. compile("com.fasterxml.jackson.core:jackson-core:2.3.1")
  35. compile("com.fasterxml.jackson.core:jackson-databind:2.3.3")
  36. compile group: 'com.googlecode.protobuf-java-format', name: 'protobuf-java-format', version: '1.2'
  37. compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
  38. compile group: 'com.google.code.gson', name: 'gson', version: '2.2.4'
  39. compile group: 'cn.thinkingdata', name: 'thinkingdatasdk', version: '1.5.1'
  40. // compile("org.luaj:luaj-jse:3.0.1")
  41. compile("org.apache.thrift:libthrift:0.9.2")
  42. // compile group: 'com.carrotsearch', name: 'java-sizeof', version: '0.0.5';
  43. compile("com.alibaba:fastjson:1.2.47")
  44. compile("org.apache.httpcomponents:httpclient:4.5.3")
  45. compile files("${System.properties['java.home']}/../lib/tools.jar")
  46. }
  47. //依赖编译,然后打包JAR
  48. task taskJar(type:Jar, dependsOn: compileJava) {
  49. from 'build/classes/main'
  50. destinationDir = file('build/libs')
  51. }
  52. //删除lib中的jar
  53. task clearJars(type:Delete){
  54. delete 'lib'
  55. }
  56. task copyJars(type: Copy, dependsOn:clearJars) {
  57. from configurations.runtime
  58. into 'lib' // 目标位置
  59. }
  60. [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'