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 'commons-io:commons-io:2.10.0' implementation 'com.android.tools.build:apkzlib:4.2.1' implementation 'com.beust:jcommander:1.81' } sourceSets.main.java.srcDirs += "$rootProject.projectDir/apksigner/src/apksigner/java" 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' } tasks.register("buildDebug") { jar.dependsOn(':appstub:copyDebug') jar.dependsOn(':app:copyDebug') dependsOn(build) } tasks.register("buildRelease") { jar.dependsOn(':appstub:copyRelease') jar.dependsOn(':app:copyRelease') 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 "**/*.*" }