Marking of more classes, might get rid of in the future and optimize; Implement shrin...
[SquirrelJME.git] / tools / markdown-javadoc / build.gradle
blob188740a7a30e473010c3ac89dbfad7e6d3420c50
1 import org.gradle.plugins.ide.idea.model.IdeaLanguageLevel
3 import java.nio.file.Files
4 import java.nio.file.Paths
6 plugins {
7         id "java-library"
8         id "idea"
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
16 jar {
19 shadowJar {
20         dependsOn jar
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) {
28                 // Windows/Linux
29                 toolsJar = files(Paths.get("${System.properties['java.home']}")
30                         .getParent().resolve("jmods").resolve("jdk.javadoc.jmod"))
31                 
32                 // Mac OS
33                 if (!Files.exists(toolsJar.singleFile.toPath())) {
34                         toolsJar = files(Paths.get("${System.properties['java.home']}")
35                                 .resolve("jmods").resolve("jdk.javadoc.jmod"))
36                 }
37         }
40 dependencies {
41         // Depend directly on tools.jar so it is brought in, or the module
42         implementation files(toolsJar)
43         
44         implementation project(":modules:io-file")
45         implementation project(":modules:json")
46         implementation project(":modules:markdown-writer")
47         implementation project(":modules:tool-classfile")