GKMSPatch/patch/build.gradle

70 lines
1.7 KiB
Groovy

plugins {
id 'java-library'
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
compileJava.options.encoding = "UTF-8"
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':axmlprinter')
implementation project(':share')
implementation project(':apkzlib')
implementation 'commons-io:commons-io:2.11.0'
implementation 'com.beust:jcommander:1.81'
implementation 'com.google.code.gson:gson:2.8.8'
}
jar {
baseName = "lspatch"
destinationDirectory = new File("$rootProject.projectDir/out")
manifest {
attributes 'Main-Class': 'org.lsposed.patch.LSPatch'
}
dependsOn configurations.runtimeClasspath
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
from fileTree(dir: 'src/main', includes: ['assets/**'])
into("assets/dex") {
from fileTree(dir: "$rootProject.projectDir/out/dexes")
}
into("assets/so") {
from fileTree(dir: "$rootProject.projectDir/out/so")
}
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.MF', 'META-INF/*.txt', "META-INF/versions/**"
}
tasks.register("buildDebug") {
jar.dependsOn(':appstub:copyDebug')
jar.dependsOn(':app:copyRiruDebug')
dependsOn(build)
}
tasks.register("buildRelease") {
jar.dependsOn(':appstub:copyRelease')
jar.dependsOn(':app:copyRiruRelease')
dependsOn(build)
}
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 "**/*.*"
}