build.gradle 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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: 'com.android.library'
  26. apply plugin: 'kotlin-android'
  27. //apply plugin: 'kotlin-android-extensions'
  28. apply plugin: 'org.jetbrains.dokka-android'
  29. //apply plugin: 'maven'
  30. android {
  31. compileSdkVersion ANDROID_SDK_VERSION.toInteger()
  32. defaultConfig {
  33. minSdkVersion ANDROID_MIN_SDK_VERSION.toInteger()
  34. targetSdkVersion ANDROID_SDK_VERSION.toInteger()
  35. versionCode SAGA_CODE.toInteger()
  36. versionName SAGA_ANDROID_VERSION
  37. testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
  38. }
  39. buildTypes {
  40. release {
  41. proguardFile 'proguard-rules.pro'
  42. }
  43. }
  44. // 解决lint语法检查错误(kotlin语法无法通过lint)
  45. lintOptions {
  46. abortOnError false
  47. }
  48. kotlinOptions {
  49. jvmTarget = JVM_TARGET
  50. }
  51. }
  52. dependencies {
  53. implementation fileTree(dir: 'libs', include: ['*.jar'])
  54. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  55. // kotlin 依赖
  56. // https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib-jdk8
  57. implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: KOTLIN_VERSION
  58. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  59. // android支持
  60. implementation 'androidx.core:core-ktx:1.5.0'
  61. implementation 'androidx.appcompat:appcompat:1.3.1'
  62. implementation 'com.google.android.material:material:1.3.0'
  63. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  64. // implementation group: 'androidx.appcompat', name: 'appcompat', version: ANDROID_SUPPORT_VERSION
  65. // implementation group: 'com.google.android.material', name: 'material', version: ANDROID_SUPPORT_VERSION
  66. // implementation group: 'com.android.support', name: 'support-v4', version: ANDROID_SUPPORT_VERSION
  67. // implementation group: 'androidx.constraintlayout', name: 'constraintlayout', version: CONSTRAINT_VERSION
  68. // anko依赖
  69. // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-commons
  70. implementation group: 'org.jetbrains.anko', name: 'anko-commons', version: ANKO_VERSION
  71. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  72. // Sybotan依赖
  73. // implementation group: "cn.sagacloud", name: "sybotan-android-base", version: SYBOTAN_ANDROID_VERSION
  74. // implementation group: "cn.sagacloud", name: "sybotan-android-graphy", version: SYBOTAN_ANDROID_VERSION
  75. // implementation group: "cn.sagacloud", name: "sybotan-android-database", version: SYBOTAN_ANDROID_VERSION
  76. implementation group: 'cn.sagacloud', name: 'saga-kotlin-base', version: SAGA_KOTLIN_VERSION
  77. // implementation group: 'cn.sagacloud', name: 'saga-kotlin-database', version: SAGA_KOTLIN_VERSION
  78. implementation project(':sybotan-android-base')
  79. implementation project(':sybotan-android-database')
  80. implementation project(':sybotan-android-graphy')
  81. // Sybotan依赖
  82. // implementation group: 'cn.sagacloud', name: 'saga-kotlin-database', version: SAGA_KOTLIN_VERSION
  83. // implementation group: 'cn.sagacloud', name: 'sybotan-android-base', version: SYBOTAN_ANDROID_VERSION
  84. // implementation group: 'cn.sagacloud', name: 'sybotan-android-graphy', version: SYBOTAN_ANDROID_VERSION
  85. //noinspection GradleDependency
  86. implementation 'org.greenrobot:eventbus:3.0.0'
  87. implementation 'com.google.code.gson:gson:2.8.1'
  88. }
  89. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  90. // 文档生成
  91. // 源码
  92. task sourcesJar(type: Jar) {
  93. group = 'jar'
  94. from "${android.sourceSets.main.java.srcDirs}"
  95. classifier = 'sources'
  96. }
  97. // 文档
  98. task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
  99. jdkVersion = JDK_VERSION.toInteger()
  100. noStdlibLink = true
  101. outputFormat = 'javadoc'
  102. outputDirectory = "$buildDir/javadoc"
  103. // sourceDirs = files('src/main/java')
  104. }
  105. // 上成上传的文档jar包
  106. task javadocJar(type: Jar, dependsOn: dokkaJavadoc) {
  107. group = 'jar'
  108. classifier = 'javadoc'
  109. from "${dokka.outputDirectory}"
  110. }
  111. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  112. // maven 仓库管理
  113. // 设置上传的包,默认上传aar与pom
  114. artifacts {
  115. // 上传源码包
  116. // archives sourcesJar
  117. // 上传文档包
  118. // archives javadocJar
  119. }
  120. /*uploadArchives {
  121. repositories {
  122. mavenDeployer {
  123. pom.groupId = project.group
  124. pom.version = project.version
  125. pom.artifactId = project.name
  126. pom.project {
  127. name project.name
  128. packaging 'jar'
  129. url SAGA_URL
  130. description '上格云cad引擎库。'
  131. licenses {
  132. license {
  133. name 'The Apache Software License, Version 2.0'
  134. url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
  135. }
  136. }
  137. developers {
  138. developer {
  139. id DEVELOPER_ID
  140. name DEVELOPER_NAME
  141. }
  142. }
  143. }
  144. snapshotRepository(url: MAVEN_REPO_SNAPSHOT_URL) {
  145. authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
  146. }
  147. repository(url: MAVEN_REPO_RELEASE_URL) {
  148. authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
  149. }
  150. }
  151. }
  152. }*/