build.gradle 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. buildscript {
  2. repositories {
  3. maven { url "http://maven.aliyun.com/nexus/content/groups/public" }
  4. mavenLocal()
  5. mavenCentral()
  6. }
  7. }
  8. apply from:"./config.gradle"
  9. apply plugin: 'java'
  10. apply plugin: 'eclipse'
  11. sourceCompatibility=1.8
  12. group = 'kd.bos.service'
  13. version = '1.0'
  14. tasks.withType(JavaCompile) {
  15. options.encoding = "UTF-8"
  16. }
  17. def cus= ext.path.cus
  18. def trd= ext.path.trd
  19. def bos= ext.path.bos
  20. def outputdir= ext.path.outputdir
  21. def currentapp= ext.path.currentapp
  22. def biz= ext.path.biz
  23. dependencies {
  24. implementation fileTree(dir: bos, include: '**/*.jar')
  25. implementation fileTree(dir: trd, include: '**/*.jar')
  26. implementation fileTree(dir: biz, include: '**/*.jar')
  27. implementation fileTree(dir: cus, include: '**/*.jar')
  28. implementation project(":zlkj_hr_common")
  29. implementation project(":zlkj_hr_opmc")
  30. }
  31. task sourcesJar(type: Jar, dependsOn: build) {
  32. classifier = 'sources'
  33. from sourceSets.main.allSource
  34. }
  35. task copytolib(type: Copy,dependsOn: build){
  36. group 'build'
  37. description '拷贝本工程构建jar包到lib'
  38. from 'build/libs'
  39. into outputdir
  40. exclude '*source*.jar'
  41. }
  42. task copytorootlib(type: Copy){
  43. group 'build'
  44. description '拷贝本工程构建jar包到根目录build/libs'
  45. from 'build/libs'
  46. into '../build/libs'
  47. exclude '*source*.jar'
  48. }
  49. task copyJarTodir(type: Copy){
  50. group 'build'
  51. description '拷贝工程产生的build.jar到本地库'
  52. from 'build/libs'
  53. into cus
  54. exclude '**/*.class'
  55. }
  56. /**
  57. * 执行zip打包操作
  58. */
  59. task zip(type: Zip, dependsOn: jar) {
  60. group 'build'
  61. description '将jar打包成zip'
  62. from 'build/libs'
  63. destinationDir file('build/zip')
  64. }
  65. task copyZipTodir(type: Copy){
  66. group 'build'
  67. description '拷贝工程产生的build.zip到本地库'
  68. from 'build/zip'
  69. destinationDir file('build/zip')
  70. into '../build/zip'
  71. }
  72. test.ignoreFailures true
  73. // // 定义jar包manifest的信息,以便分析问题
  74. // jar {
  75. // baseName = 'zlkj_application_plugin'
  76. // version = '1.0'
  77. // manifest {
  78. // attributes 'Builddate': new Date().format("yyyyMMddHHmm", TimeZone.getTimeZone("GMT+08:00"))
  79. // attributes 'Release': ''
  80. // }
  81. // }
  82. //
  83. // // 定义zip包manifest的信息,以便分析问题
  84. // zip {
  85. // baseName = 'zlkj_application_plugin'
  86. // version = '1.0'
  87. // manifest {
  88. // attributes 'Builddate': new Date().format("yyyyMMddHHmm", TimeZone.getTimeZone("GMT+08:00"))
  89. // attributes 'Release': ''
  90. // }
  91. // }