diff --git a/build.gradle b/build.gradle index 04ef40501..bd6630883 100644 --- a/build.gradle +++ b/build.gradle @@ -41,15 +41,6 @@ subprojects { 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 -> if (getPlugins().hasPlugin('com.android.library') || 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') { android { signingConfigs {