Commit 4b8e92f0 authored by Shaka Huang's avatar Shaka Huang Committed by John Wu

compile options should be set after evaulation process

Signed-off-by: 's avatarShaka Huang <shakalaca@gmail.com>
parent fc6ef7dd
...@@ -41,15 +41,6 @@ subprojects { ...@@ -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 { ...@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment