1 import cc.squirreljme.plugin.general.cmake.CMakeBuildTask
3 import java.nio.file.Files
10 description = "This is able to use the NanoCoat shared library to run the " +
11 "code within the emulator."
15 api project(":emulators:emulator-base")
17 api project(":modules:cldc-compact")
18 api project(":modules:common-vm")
19 api project(":modules:meep-swm")
20 api project(":modules:tool-classfile")
21 api project(":modules:debug-jdwp")
22 api project(":modules:debug-jdwp-vm-host")
23 api project(":tools:squirreljme-debugger")
26 Provider<CMakeBuildTask> libNativeNanoCoat = tasks.register(
29 gradle.rootProject.projectDir.toPath().resolve("nanocoat"),
30 System.mapLibraryName("emulator-nanocoat"),
33 libNativeNanoCoat.configure { taskIsh ->
34 // Get source root for extra dependency checking
35 java.nio.file.Path cmakeRoot = taskIsh.cmakeSource
37 // Where is the CMake root? It depends on it
39 cmakeRoot.resolve("CMakeLists.txt"),
40 cmakeRoot.resolve("squirreljme-version"),
41 cmakeRoot.resolve("frontend").resolve("CMakeLists.txt"))
42 taskIsh.inputs.dir(cmakeRoot.resolve("cmake"))
43 taskIsh.inputs.dir(cmakeRoot.resolve("include"))
44 taskIsh.inputs.dir(cmakeRoot.resolve("src"))
45 taskIsh.inputs.dir(cmakeRoot.resolve("frontend").resolve("emulator"))
48 // We need to include the native library here so NanoCoat actually works
50 // Requires the NanoCoat library
51 dependsOn libNativeNanoCoat
53 // Include library into the root
54 from libNativeNanoCoat.get().cmakeOutFile.toFile()
60 // We need to embed the shared library here
61 dependsOn libNativeNanoCoat
65 // Use a fixed version of the JVM
68 sourceCompatibility = JavaVersion.VERSION_1_8
69 targetCompatibility = JavaVersion.VERSION_1_8
71 // Use the default bootstrap classpath
72 options.bootstrapClasspath = null
76 compileJava.options.debug = true
77 compileJava.options.debugOptions.setDebugLevel("source,lines,vars")
80 compileTestJava.options.debug = compileJava.options.debug
81 compileTestJava.options.debugOptions = compileJava.options.debugOptions
83 javadoc.options.tags = [ "squirreljme.property",
86 "squirreljme.syscallparam",
87 "squirreljme.syscallreturn",
88 "squirreljme.tsiparam",
89 "squirreljme.configtype",
90 "squirreljme.uiwidgetparam" ]