mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-12 08:33:37 +00:00
compile options should be set after evaulation process
Signed-off-by: Shaka Huang <shakalaca@gmail.com>
This commit is contained in:
parent
fc6ef7dd57
commit
4b8e92f00a
18
build.gradle
18
build.gradle
@ -41,15 +41,6 @@ subprojects {
|
|||||||
maven { url "http://oss.sonatype.org/content/repositories/snapshots" }
|
maven { url "http://oss.sonatype.org/content/repositories/snapshots" }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getPlugins().hasPlugin('java')) {
|
|
||||||
tasks.withType(JavaCompile) {
|
|
||||||
// If building with JDK 9+, we need additional flags to generate compatible bytecode
|
|
||||||
if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
|
|
||||||
options.compilerArgs += ['--release', '8']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
afterEvaluate { module ->
|
afterEvaluate { module ->
|
||||||
if (getPlugins().hasPlugin('com.android.library') ||
|
if (getPlugins().hasPlugin('com.android.library') ||
|
||||||
getPlugins().hasPlugin('com.android.application')) {
|
getPlugins().hasPlugin('com.android.application')) {
|
||||||
@ -70,6 +61,15 @@ subprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getPlugins().hasPlugin('java')) {
|
||||||
|
tasks.withType(JavaCompile) {
|
||||||
|
// If building with JDK 9+, we need additional flags to generate compatible bytecode
|
||||||
|
if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
|
||||||
|
options.compilerArgs += ['--release', '8']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (module.name == 'app' || module.name == 'stub') {
|
if (module.name == 'app' || module.name == 'stub') {
|
||||||
android {
|
android {
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user