apply plugin: 'java'

repositories {
    mavenCentral()
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(":axml")
    testCompile group: 'junit', name: 'junit', version: '4.11'
}

task release(type: Zip) {
    baseName = 'ApkShield-release-20180105'//ApkShield-release-date

    into('input'){
        from 'input/shield.apk'
    }

    into('libs') {
        from configurations.runtime
    }

    into('bin'){
        from 'bin'
    }

    into('files'){
        from 'files/lib-release'
        from 'files/smali-release'
    }

    from jar.outputs.files
}

task debug(type: Zip) {
    baseName = 'Apk-debug-20180327' //ApkShield-release-date

    into('input'){
        from 'input'
    }

    into('libs') {
        from configurations.runtime
    }

    into('bin'){
        from 'bin'
    }

    into('files'){
        from 'files/lib-debug'
        from 'files/smali-debug'
    }

    from jar.outputs.files
}
//控制输出什么版本
artifacts {
   // archives release
    archives debug
}


jar {
    manifest {
        attributes "Implementation-Title": "ApkShield"
        attributes 'Main-Class': 'com.wknight.safe.shield.Main'
        attributes "Class-Path": configurations.runtime.collect { "libs/" + it.getName() }.join(' ')
    }
}