apply plugin: 'java-library'

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':axmlprinter')
}

jar{
    baseName = "xpatch"
//    version = '1.0'
    manifest {
        attributes 'Main-Class': 'com.storm.wind.xpatch.MainCommand'
    }
    //添加将引用的jar的源码打入最终的jar
    from {
        (configurations.runtime).collect {
            it.isDirectory() ? it : zipTree(it)
        }
    }

    from fileTree(dir:'src/main', includes: ['assets/**'])

    //排除引用的jar中的签名信息
    exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.MF'
}

//添加源码中引入的非代码文件，例如资源等
sourceSets.main.resources {
    srcDirs = [
            "src/main/java",
    ];
    include "**/*.*"
}