buildJar.gradle 562 B

123456789101112131415161718192021
  1. def SDK_BASENAME = "eyuangamesdk_base"
  2. def SDK_VERSION = "1.0.3"
  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. baseName = SDK_BASENAME + SEPARATOR + SDK_VERSION
  15. destinationDir = file(sdkDestinationPath)
  16. }
  17. makeJar.dependsOn(deleteBaseBuild, build)