-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
135 lines (124 loc) · 5.42 KB
/
build.gradle.kts
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.util.capitalizeDecapitalize.toLowerCaseAsciiOnly
plugins {
kotlin("jvm") version "1.6.10"
id("org.jetbrains.compose") version "1.1.0"
id("org.openjfx.javafxplugin") version "0.0.11"
}
val projectVersion: String by project
group = "de.uzl.itcr"
version = projectVersion
repositories {
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
google()
mavenCentral()
}
val hapiVersion = "5.7.0"
val slf4jVersion = "1.7.36"
val graphStreamVersion = "2.0"
val jGraphTVersion = "1.5.1"
val material3DesktopVersion = "1.1.0"
val jungraphtVersion = "1.3"
val composeDesktopVersion = "1.1.0"
val ktorVersion = "2.0.0-beta-1"
dependencies {
testImplementation(kotlin("test"))
implementation(compose.desktop.currentOs)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
implementation("org.jetbrains.compose.components:components-splitpane:$composeDesktopVersion")
implementation("org.jetbrains.compose.material3:material3-desktop:$material3DesktopVersion")
implementation("org.jetbrains.compose.material:material-icons-core-desktop:$composeDesktopVersion")
implementation("org.jetbrains.compose.material:material-icons-extended-desktop:$composeDesktopVersion")
implementation("ca.uhn.hapi.fhir:hapi-fhir-base:$hapiVersion")
implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-r4:$hapiVersion")
implementation("ca.uhn.hapi.fhir:hapi-fhir-validation:$hapiVersion")
implementation("org.slf4j:slf4j-api:$slf4jVersion")
implementation("org.slf4j:slf4j-simple:$slf4jVersion")
implementation("org.jgrapht:jgrapht-core:$jGraphTVersion")
implementation("org.jgrapht:jgrapht-ext:$jGraphTVersion")
implementation("com.github.tomnelson:jungrapht-visualization:$jungraphtVersion")
implementation("com.github.tomnelson:jungrapht-layout:$jungraphtVersion")
implementation("net.mahdilamb:colormap:0.9.511")
implementation("li.flor:native-j-file-chooser:1.6.4")
implementation("javax.xml.bind:jaxb-api:2.4.0-b180830.0359") // provides org.xml.sax
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation("com.formdev:flatlaf:2.0.2")
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.ktor:ktor-client-cio:$ktorVersion")
implementation("me.xdrop:fuzzywuzzy:1.4.0")
implementation("com.fifesoft:rsyntaxtextarea:3.1.6")
}
tasks.test {
useJUnitPlatform()
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
javafx {
// add javafx to the classpath
version = "17.0.1"
modules("javafx.controls", "javafx.swing")
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
}
val composeBuildVersion: String by project
val composeBuildOs: String? by project
compose.desktop {
application {
mainClass = "terminodiff.MainKt"
if (composeBuildOs != null) {
nativeDistributions {
val resourceDir = project.layout.projectDirectory.dir("resources")
appResourcesRootDir.set(resourceDir)
licenseFile.set(project.file("LICENSE"))
packageName = "TerminoDiff"
packageVersion = composeBuildVersion
description = "Visually compare HL7 FHIR Terminology"
vendor = "IT Center for Clinical Research, University of Lübeck"
copyright = "Joshua Wiedekopf / IT Center for Clinical Research, 2022-"
when (composeBuildOs?.toLowerCaseAsciiOnly()) {
"ubuntu", "redhat", "debian", "rpm", "deb" -> linux {
iconFile.set(resourceDir.file("common/terminodiff.png"))
rpmLicenseType = "GPL-3.0"
debMaintainer = "[email protected]"
appCategory = "Development"
when (composeBuildOs) {
"ubuntu", "debian", "deb" -> targetFormats(
TargetFormat.Deb,
)
"redhat", "rpm" -> targetFormats(
TargetFormat.Rpm
)
}
}
"mac", "macos" -> macOS {
jvmArgs += listOf("-Dskiko.renderApi=SOFTWARE")
bundleID = "de.uzl.itcr.terminodiff"
signing {
sign.set(false)
}
iconFile.set(resourceDir.file("macos/terminodiff.icns"))
targetFormats(
TargetFormat.Dmg
)
}
"windows", "win" -> windows {
iconFile.set(resourceDir.file("windows/terminodiff.ico"))
perUserInstall = true
dirChooser = true
upgradeUuid = "ECFA19D9-D1F2-4AF5-9E5E-59A8F21C3A79"
menuGroup = "TerminoDiff"
targetFormats(
TargetFormat.Exe
)
}
}
}
}
}
}