From ffc06e97a806a6ad490a808ccccd610e2b87f350 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Wed, 7 Sep 2022 14:29:55 -0400 Subject: [PATCH] fix: set Java target version to 1.8 By default, Gradle won't specify a target Java version so it will produce bytecode for whatever JDK runs the build, meaning if JDK 17 is used, Java classes for 17 will be produced. This output won't work with Fortify since it runs Java 8. Therefore, the target version must be set to 1.8 for the output to be usable. See: https://docs.gradle.org/current/userguide/java_plugin.html --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index fc987c6..29f1b1b 100755 --- a/build.gradle +++ b/build.gradle @@ -28,6 +28,7 @@ apply from: "${gradleHelpersLocation}/readme2html.gradle" apply plugin: 'java' sourceCompatibility = 1.8 +targetCompatibility = 1.8 sourceSets { test {