• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3  */
4 
<lambda>null5 buildscript {
6     dependencies {
7         // this line can be removed when https://github.com/openjfx/javafx-gradle-plugin/pull/135 is released
8         classpath("org.javamodularity:moduleplugin:1.8.12")
9     }
10 }
11 
<lambda>null12 plugins {
13     id("org.openjfx.javafxplugin") version "0.0.13"
14 }
15 
<lambda>null16 configurations {
17     register("javafx")
18     named("compileOnly") {
19         extendsFrom(configurations["javafx"])
20     }
21     named("testImplementation") {
22         extendsFrom(configurations["javafx"])
23     }
24 }
25 
<lambda>null26 javafx {
27     version = version("javafx")
28     modules = listOf("javafx.controls")
29     configuration = "javafx"
30 }
31 
32 // Fixup moduleplugin in order to properly run with classpath
<lambda>null33 tasks {
34     test {
35         extensions.configure(org.javamodularity.moduleplugin.extensions.TestModuleOptions::class) {
36             addReads["kotlinx.coroutines.core"] = "junit"
37             addReads["kotlinx.coroutines.javafx"] = "kotlin.test"
38         }
39         jvmArgs = listOf(
40             "--patch-module",
41             "kotlinx.coroutines.core=${
42                 project(":kotlinx-coroutines-core").tasks.named<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>(
43                     "compileTestKotlinJvm"
44                 ).get().destinationDirectory.get()
45             }"
46         )
47     }
48 }
49