buildJar.gradle 478 B

1234567891011121314151617181920
  1. def SDK_BASENAME = "huawei"
  2. def sdkDestinationPath = "build/jar/"
  3. def zipFile = file('build/intermediates/aar_main_jar/release/classes.jar')
  4. static def buildTime() {
  5. return new Date().format("yyyyMMddHHmm", TimeZone.getDefault())
  6. }
  7. task deleteBaseBuild(type: Delete) {
  8. delete sdkDestinationPath
  9. }
  10. task makeJar(type: Jar) {
  11. from zipTree(zipFile)
  12. baseName(SDK_BASENAME)
  13. destinationDir(file(sdkDestinationPath))
  14. }
  15. makeJar.dependsOn(deleteBaseBuild, build)