-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make build of Kotlin module work with Java 8 again
- Loading branch information
Showing
2 changed files
with
16 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,13 +75,23 @@ signing { | |
} | ||
} | ||
|
||
def kotlinCompilerArgs = [ | ||
"[email protected]:strict", | ||
"-Xemit-jvm-type-annotations" // Required for annotations on type variables | ||
] | ||
|
||
// See https://github.com/jqwik-team/jqwik/issues/546#issuecomment-2180009926 | ||
// Not supported by Java 8 | ||
def isJava8 = javaTargetVersion == '8' || javaTargetVersion == '1.8' | ||
if (!isJava8) { | ||
kotlinCompilerArgs += [ | ||
"-Xjvm-target=${javaTargetVersion}" | ||
] | ||
} | ||
|
||
tasks.withType(KotlinCompile).configureEach { | ||
compilerOptions { | ||
freeCompilerArgs = [ | ||
"[email protected]:strict", | ||
"-Xemit-jvm-type-annotations", // Required for annotations on type variables | ||
"-Xjdk-release=${javaTargetVersion}" // See https://github.com/jqwik-team/jqwik/issues/546#issuecomment-2180009926 | ||
] | ||
freeCompilerArgs = kotlinCompilerArgs | ||
apiVersion = KotlinVersion.KOTLIN_1_9 | ||
languageVersion = KotlinVersion.KOTLIN_1_9 | ||
javaParameters = true // Required to get correct parameter names in reporting | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters