def SDK_BASENAME = "hnyy" def SDK_VERSION = "1.0.0" def SEPARATOR = "_" def sdkDestinationPath = "build/jar/" def zipFile = file('build/intermediates/aar_main_jar/release/classes.jar') static def buildTime() { return new Date().format("yyyyMMddHHmm", TimeZone.getDefault()) } task deleteBaseBuild(type: Delete) { delete sdkDestinationPath } task makeJar(type: Jar) { from zipTree(zipFile) baseName = SDK_BASENAME + SEPARATOR + SDK_VERSION destinationDir = file(sdkDestinationPath) } makeJar.dependsOn(deleteBaseBuild, build)