-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
112 lines (90 loc) · 3.56 KB
/
build.gradle.kts
File metadata and controls
112 lines (90 loc) · 3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/*
* Copyright 2026, TeamDev. All rights reserved.
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
* disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
plugins {
java
kotlin("jvm") version "2.3.0"
// Adds JxBrowser.
id("com.teamdev.jxbrowser") version "1.2.1"
// Adds UI toolkits.
id("org.openjfx.javafxplugin") version "0.1.0"
id("org.jetbrains.compose") version "1.10.3"
id("org.jetbrains.kotlin.plugin.compose") version "2.3.0"
}
val jxBrowserVersion by extra { "9.1.0" } // The version of JxBrowser used in the examples.
val guavaVersion by extra { "29.0-jre" } // Some of the examples use Guava.
repositories {
mavenCentral()
google()
}
allprojects {
group = "com.teamdev.jxbrowser-examples"
version = jxBrowserVersion
}
subprojects {
apply(plugin = "java")
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "com.teamdev.jxbrowser")
apply(plugin = "org.openjfx.javafxplugin")
apply(plugin = "org.jetbrains.compose")
apply(plugin = "org.jetbrains.kotlin.plugin.compose")
repositories {
mavenCentral()
google()
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
jxbrowser {
version = jxBrowserVersion
}
javafx {
version = "17"
modules = listOf("javafx.controls", "javafx.swing", "javafx.fxml")
}
dependencies {
// JxBrowser dependencies for the current platform.
implementation(jxbrowser.currentPlatform)
// JxBrowser for JavaFX dependency.
implementation(jxbrowser.javafx)
// JxBrowser for Swing dependency.
implementation(jxbrowser.swing)
// JxBrowser for Compose dependency.
implementation(jxbrowser.compose)
// JxBrowser for SWT dependency.
implementation(jxbrowser.swt)
// Dependency on Compose for the current platform.
implementation(compose.desktop.currentOs)
// Dependency on an SWT for the current platform.
implementation(Swt.toolkitDependency)
// Depend on Guava for the Resources utility class used for
// loading resource files into strings.
implementation("com.google.guava:guava:$guavaVersion")
// This file is used by `JarProtocol` example.
runtimeOnly(files(rootDir.resolve("examples/src/main/resources/tiny-website.jar")))
}
tasks.withType<JavaExec> {
// Assign all Java system properties from
// the command line to the JavaExec task.
systemProperties(System.getProperties().mapKeys { it.key as String })
}
// Configures the platform-dependent SWT dependencies.
Swt.configurePlatformDependency(project)
}