build.gradle 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /*
  2. * ********************************************************************************************************************
  3. *
  4. * iFHS7.
  5. * ;BBMBMBMc rZMBMBR BMB
  6. * MBEr:;PBM, 7MBMMEOBB: BBB RBW
  7. * XK: BO SB. :SZ MBM. c;; ir BBM :FFr :SSF: ;xBMB:r iuGXv. i:. iF2;
  8. * DBBM0r. :D S7 ;XMBMB GMBMu. MBM: BMB MBMBBBMBMS WMBMBMBBK MBMBMBM BMBRBMBW .MBMBMBMBB
  9. * :JMRMMD .. , 1MMRM1; ;MBMBBR: MBM ;MB: BMB: MBM. RMBr sBMH BM0 UMB, BMB. KMBv
  10. * ;. XOW B1; :uM: 1RE, i .2BMBs rMB. MBO MBO JMB; MBB MBM BBS 7MBMBOBM: MBW :BMc
  11. * OBRJ.SEE MRDOWOR, 3DE:7OBM . ;BMB RMR7BM BMB MBB. BMB ,BMR .BBZ MMB rMB, BMM rMB7
  12. * :FBRO0D0 RKXSXPR. JOKOOMPi BMBSSWBMB; BMBB: MBMB0ZMBMS .BMBOXRBMB MBMDE RBM2;SMBM; MBB xBM2
  13. * iZGE O0SHSPO. uGZ7. sBMBMBDL :BMO OZu:BMBK, rRBMB0; ,EBMB xBMBr:ER. RDU :OO;
  14. * ,BZ, 1D0 RPSFHXR. xWZ .SMr . .BBB
  15. * :0BMRDG RESSSKR. 2WOMBW; BMBMR
  16. * i0BM: SWKHKGO MBDv
  17. * .UB OOGDM. MK, Copyright (c) 2015-2019. 斯伯坦机器人
  18. * , XMW ..
  19. * r All rights reserved.
  20. *
  21. * ********************************************************************************************************************
  22. */
  23. group rootProject.group
  24. version rootProject.version
  25. apply plugin: "kotlin"
  26. apply plugin: "org.jetbrains.dokka"
  27. apply plugin: "maven"
  28. apply plugin: 'ca.coglinc.javacc'
  29. sourceCompatibility = JVM_TARGET
  30. compileKotlin {
  31. kotlinOptions.jvmTarget = JVM_TARGET
  32. }
  33. compileTestKotlin {
  34. kotlinOptions.jvmTarget = JVM_TARGET
  35. }
  36. compileJavacc {
  37. inputDirectory = file("src/main/javacc")
  38. outputDirectory = file("src/main/kotlin/com/sybotan/database/parser")
  39. }
  40. dependencies {
  41. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  42. // kotlin 依赖
  43. compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk8", version: KOTLIN_VERSION
  44. compile group: "org.jetbrains.kotlin", name: "kotlin-reflect", version: KOTLIN_VERSION
  45. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  46. // 单元测试
  47. // https://mvnrepository.com/artifact/org.testng/testng
  48. testCompile group: 'org.testng', name: 'testng', version: TESTNG_VERSION
  49. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  50. compile group: "javax.persistence", name: "persistence-api", version: PERSISTENCE_VERSION
  51. // https://mvnrepository.com/artifact/io.swagger/swagger-annotations
  52. compile group: 'io.swagger', name: 'swagger-annotations', version: '1.5.22'
  53. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  54. // Sybotan依赖
  55. compile project(':saga-kotlin-base')
  56. // // https://mvnrepository.com/artifact/net.java.dev.javacc/javacc
  57. // compile group: 'net.java.dev.javacc', name: 'javacc', version: '6.1.2'
  58. }
  59. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  60. // 文档生成
  61. dokka {
  62. jdkVersion = JDK_VERSION
  63. outputFormat = "javadoc"
  64. outputDirectory = "$buildDir/javadoc"
  65. //sourceDirs = files("src/main/kotlin")
  66. }
  67. // 上成上传的文档jar包
  68. task javadocJar(type: Jar, dependsOn: dokka) {
  69. classifier = "javadoc"
  70. from dokka.outputDirectory
  71. }
  72. // 上成上传的文档jar包
  73. task sourcesJar(type: Jar) {
  74. classifier = 'sources'
  75. from sourceSets.main.allSource
  76. }
  77. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  78. // maven 仓库管理
  79. // 设置上传的包,默认上传aar与pom
  80. artifacts {
  81. // archives javadocJar
  82. // archives sourcesJar
  83. }
  84. uploadArchives {
  85. repositories {
  86. mavenDeployer {
  87. pom.groupId = project.group
  88. pom.version = project.version
  89. pom.artifactId = project.name
  90. pom.project {
  91. name project.name
  92. packaging "jar"
  93. url SAGA_URL
  94. description "斯伯坦机器人 Kotlin 数据库操作支持库。"
  95. licenses {
  96. license {
  97. name LICENSE_NAME
  98. url LICENSE_URL
  99. }
  100. }
  101. developers {
  102. developer {
  103. id DEVELOPER_ID
  104. name DEVELOPER_NAME
  105. }
  106. }
  107. }
  108. snapshotRepository(url: MAVEN_REPO_SNAPSHOT_URL) {
  109. authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
  110. }
  111. repository(url: MAVEN_REPO_RELEASE_URL) {
  112. authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
  113. }
  114. }
  115. }
  116. }