buildJar.gradle 564 B

12345678910111213141516171819202122
  1. def SDK_BASENAME = "yyxx_comm_base"
  2. def SDK_VERSION = "1.0.0"
  3. def SEPARATOR = "_"
  4. def sdkDestinationPath = "build/jar/"
  5. def zipFile = file('build/intermediates/aar_main_jar/release/classes.jar')
  6. static def buildTime() {
  7. return new Date().format("yyyyMMddHHmm", TimeZone.getDefault())
  8. }
  9. task deleteBaseBuild(type: Delete) {
  10. delete sdkDestinationPath
  11. }
  12. task makeJar(type: Jar) {
  13. from zipTree(zipFile)
  14. setBaseName(SDK_BASENAME + SEPARATOR + SDK_VERSION)
  15. setDestinationDir(file(sdkDestinationPath))
  16. }
  17. makeJar.dependsOn(deleteBaseBuild, build)