Always use latest hiddenapi-stub jar built from sources

This commit is contained in:
solohsu 2019-04-20 12:08:21 +08:00
parent 162338f69b
commit c13ae31b4c
13 changed files with 22 additions and 15 deletions

View File

@ -24,6 +24,7 @@ allprojects {
templateLibPath = templateRootPath + "/system/lib/"
templateLib64Path = templateRootPath + "/system/lib64/"
templateEtcPath = templateRootPath + "/system/etc/"
hiddenApiStubJarFilePath = project(":hiddenapi-stubs").projectDir.absolutePath + "/libs/framework-stub.jar"
}
repositories {
google()

View File

@ -20,7 +20,7 @@ android {
}
dependencies {
compileOnly files("libs/framework-stub.jar")
compileOnly files("${hiddenApiStubJarFilePath}")
implementation project(':xposed-bridge')
compileOnly project(':dexmaker')
}
@ -43,10 +43,10 @@ preBuild.doLast {
afterEvaluate {
tasks.withType(JavaCompile) {
options.compilerArgs.add("-Xbootclasspath/p:${projectDir.absolutePath}/libs/framework-stub.jar")
options.compilerArgs.add("-Xbootclasspath/p:${hiddenApiStubJarFilePath}")
}
task("copyCommonroperties", type: Copy) {
task("copyCommonProperties", type: Copy) {
from file("${projectDir}/template_override/")
into file(templateRootPath)
}

Binary file not shown.

View File

@ -21,7 +21,7 @@ android {
}
dependencies {
compileOnly files("libs/framework-stub.jar")
compileOnly files("${hiddenApiStubJarFilePath}")
implementation project(':edxp-common')
implementation project(':xposed-bridge')
implementation 'com.swift.sandhook:hooklib:3.5.6'
@ -46,7 +46,7 @@ preBuild.doLast {
afterEvaluate {
tasks.withType(JavaCompile) {
options.compilerArgs.add("-Xbootclasspath/p:${projectDir.absolutePath}/libs/framework-stub.jar")
options.compilerArgs.add("-Xbootclasspath/p:${hiddenApiStubJarFilePath}")
}
android.applicationVariants.all { variant ->
@ -57,7 +57,7 @@ afterEvaluate {
def myTemplatePath = "${projectDir}/template_override/"
task("makeAndCopy${variantNameCapped}", type: Jar, dependsOn: "assemble${variantNameCapped}") {
dependsOn tasks.getByPath(":edxp-common:copyCommonroperties")
dependsOn tasks.getByPath(":edxp-common:copyCommonProperties")
from "${buildDir}/intermediates/dex/${variantNameLowered}/mergeDex${variantNameCapped}/out/"
destinationDir file(myTemplatePath + "system/framework/")
baseName "edxp"

View File

@ -21,7 +21,7 @@ android {
}
dependencies {
compileOnly files("libs/framework-stub.jar")
compileOnly files("${hiddenApiStubJarFilePath}")
implementation project(':edxp-common')
implementation project(':xposed-bridge')
}
@ -44,7 +44,7 @@ preBuild.doLast {
afterEvaluate {
tasks.withType(JavaCompile) {
options.compilerArgs.add("-Xbootclasspath/p:${projectDir.absolutePath}/libs/framework-stub.jar")
options.compilerArgs.add("-Xbootclasspath/p:${hiddenApiStubJarFilePath}")
}
android.applicationVariants.all { variant ->
@ -55,7 +55,7 @@ afterEvaluate {
def myTemplatePath = "${projectDir}/template_override/"
task("makeAndCopy${variantNameCapped}", type: Jar, dependsOn: "assemble${variantNameCapped}") {
dependsOn tasks.getByPath(":edxp-common:copyCommonroperties")
dependsOn tasks.getByPath(":edxp-common:copyCommonProperties")
from "${buildDir}/intermediates/dex/${variantNameLowered}/mergeDex${variantNameCapped}/out/"
destinationDir file(myTemplatePath + "system/framework/")
baseName "edxp"

Binary file not shown.

View File

@ -21,7 +21,7 @@ android {
}
dependencies {
compileOnly files("libs/framework-stub.jar")
compileOnly files("${hiddenApiStubJarFilePath}")
implementation project(':edxp-common')
implementation project(':xposed-bridge')
compileOnly project(':dexmaker')
@ -45,7 +45,7 @@ preBuild.doLast {
afterEvaluate {
tasks.withType(JavaCompile) {
options.compilerArgs.add("-Xbootclasspath/p:${projectDir.absolutePath}/libs/framework-stub.jar")
options.compilerArgs.add("-Xbootclasspath/p:${hiddenApiStubJarFilePath}")
}
android.applicationVariants.all { variant ->
@ -56,7 +56,7 @@ afterEvaluate {
def myTemplatePath = "${projectDir}/template_override/"
task("makeAndCopy${variantNameCapped}", type: Jar, dependsOn: "assemble${variantNameCapped}") {
dependsOn tasks.getByPath(":edxp-common:copyCommonroperties")
dependsOn tasks.getByPath(":edxp-common:copyCommonProperties")
from "${buildDir}/intermediates/dex/${variantNameLowered}/mergeDex${variantNameCapped}/out/"
destinationDir file(myTemplatePath + "system/framework/")
baseName "edxp"

Binary file not shown.

View File

@ -1 +1,2 @@
/build
/libs

View File

@ -14,10 +14,15 @@ android {
task makeStubJar(type: Jar){
baseName 'framework-stub'
from('build/intermediates/javac/release/compileReleaseJavaWithJavac/classes/')
from("${projectDir}/build/intermediates/javac/release/compileReleaseJavaWithJavac/classes/")
into('')
destinationDir file("${projectDir}/libs")
exclude('BuildConfig.class', 'R.class')
exclude{ it.name.startsWith('R$')}
}
makeStubJar.dependsOn(build)
afterEvaluate {
makeStubJar
}

View File

@ -40,14 +40,14 @@ preBuild.doLast {
}
dependencies {
compileOnly files("libs/framework-stub.jar")
compileOnly files("${hiddenApiStubJarFilePath}")
compileOnly project(':dexmaker')
}
afterEvaluate {
tasks.withType(JavaCompile) {
options.compilerArgs.add("-Xbootclasspath/p:${projectDir.absolutePath}/libs/framework-stub.jar")
options.compilerArgs.add("-Xbootclasspath/p:${hiddenApiStubJarFilePath}")
}
}