try fix build
This commit is contained in:
parent
a1ba19658a
commit
55d89af412
|
|
@ -3,13 +3,46 @@ plugins {
|
|||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||
targetCompatibility = JavaVersion.VERSION_1_7
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
compileJava.options.encoding = "UTF-8"
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile project(':axmlprinter')
|
||||
compile project(':apksigner')
|
||||
compile group: 'commons-io', name: 'commons-io', version: '2.8.0'
|
||||
}
|
||||
|
||||
jar {
|
||||
baseName = "mmpatch"
|
||||
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'
|
||||
}
|
||||
|
||||
tasks.build.doLast {
|
||||
println("Build to " + jar.archivePath)
|
||||
println("Try \'java -jar " + jar.archiveName + "\' find more help")
|
||||
}
|
||||
|
||||
//添加源码中引入的非代码文件,例如资源等
|
||||
sourceSets.main.resources {
|
||||
srcDirs = [
|
||||
"src/main/java",
|
||||
];
|
||||
include "**/*.*"
|
||||
}
|
||||
Loading…
Reference in New Issue