From 98f5a066a4b1532160db90de89dfe2f492558cc9 Mon Sep 17 00:00:00 2001 From: Remko Popma Date: Fri, 12 Apr 2019 19:04:56 +0900 Subject: [PATCH] #495 only use --module-path compiler option when running on Java 9 or higher --- picocli-core-module/build.gradle | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/picocli-core-module/build.gradle b/picocli-core-module/build.gradle index 22146c889..01dd552b9 100644 --- a/picocli-core-module/build.gradle +++ b/picocli-core-module/build.gradle @@ -24,9 +24,11 @@ task copyRootProjectCode(type: Copy) { compileJava { inputs.property("moduleName", moduleName) doFirst { - options.compilerArgs = [ - '--module-path', classpath.asPath, - ] + if (org.gradle.api.JavaVersion.current().isJava9Compatible()) { + options.compilerArgs = [ + '--module-path', classpath.asPath, + ] + } classpath = files() } }