From 76b4bd3c3a63a6e74f86b11d10dcae6418e8fec3 Mon Sep 17 00:00:00 2001 From: Lai Jiang Date: Wed, 10 Mar 2021 09:00:08 -0500 Subject: [PATCH] Print JAVA_HOME and PATH in the java format checker task (#997) * Print JAVA_HOME and PATH in the java format checker task This allows is to identify if the java version is incompatible with the formater checker jar file. * Show which Java binary is used * show java version * Fix exeInBash arguments --- build.gradle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.gradle b/build.gradle index 4a967c854..505f7a2be 100644 --- a/build.gradle +++ b/build.gradle @@ -401,6 +401,10 @@ def createGetBuildSrcDirectDepsTask(outputFileName) { rootProject.ext { invokeJavaDiffFormatScript = { action -> + println("JAVA_HOME=${System.env.JAVA_HOME}") + println("PATH=${System.env.PATH}") + println(ext.execInBash("type java", "${rootDir}")) + println(ext.execInBash("java -version", "${rootDir}")) def scriptDir = rootDir.path.endsWith('buildSrc') ? "${rootDir}/../java-format" : "${rootDir}/java-format"