1 import org.gradle.plugins.ide.idea.model.IdeaLanguageLevel
3 import java.nio.file.Files
4 import java.nio.file.Paths
9 id "com.github.johnrengelman.shadow" version "7.1.2"
12 // Say this is a Java 8 project
13 sourceCompatibility = JavaVersion.VERSION_1_8
14 targetCompatibility = JavaVersion.VERSION_1_8
23 // On Java 8 we have tools.jar for this
24 FileCollection toolsJar = files(Paths.get("${System.properties['java.home']}")
25 .getParent().resolve("lib").resolve("tools.jar"))
26 if (!Files.exists(toolsJar.singleFile.toPath())) {
27 if (JavaVersion.current() >= JavaVersion.VERSION_1_9) {
29 toolsJar = files(Paths.get("${System.properties['java.home']}")
30 .getParent().resolve("jmods").resolve("jdk.javadoc.jmod"))
33 if (!Files.exists(toolsJar.singleFile.toPath())) {
34 toolsJar = files(Paths.get("${System.properties['java.home']}")
35 .resolve("jmods").resolve("jdk.javadoc.jmod"))
41 // Depend directly on tools.jar so it is brought in, or the module
42 implementation files(toolsJar)
44 implementation project(":modules:io-file")
45 implementation project(":modules:json")
46 implementation project(":modules:markdown-writer")
47 implementation project(":modules:tool-classfile")