-
Notifications
You must be signed in to change notification settings - Fork 4
/
notes.txt
184 lines (159 loc) · 6.47 KB
/
notes.txt
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
To run it with Java 11:
-Dio.netty.tryReflectionSetAccessible=true
--illegal-access=warn
--module-path P:\Programowanie\Programy\javafx-sdk-11.0.2\lib
--add-modules javafx.base,javafx.controls,javafx.fxml,javafx.graphics
--add-opens javafx.base/com.sun.javafx.runtime=ALL-UNNAMED
--add-opens javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED
--add-opens javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED
--add-opens javafx.base/com.sun.javafx.binding=ALL-UNNAMED
--add-opens javafx.base/com.sun.javafx.event=ALL-UNNAMED
--add-opens javafx.graphics/com.sun.javafx.stage=ALL-UNNAMED
--add-opens javafx.graphics/javafx.scene=ALL-UNNAMED
--add-opens javafx.controls/javafx.scene.control=ALL-UNNAMED
--add-opens javafx.controls/javafx.scene.control=ALL-UNNAMED
--add-opens javafx.graphics/com.sun.javafx.util=ALL-UNNAMED
--add-opens java.base/jdk.internal.misc=ALL-UNNAMED
--add-opens java.base/java.lang=opencv
--add-opens java.base/java.lang.reflect=com.jfoenix
--add-exports javafx.controls/com.sun.javafx.scene.control.behavior=com.jfoenix
--add-exports javafx.controls/com.sun.javafx.scene.control=com.jfoenix
--add-opens javafx.controls/javafx.scene.control=automationBoot
--add-opens javafx.graphics/javafx.scene=automationBoot
Kotlin DLS migration:
import java.io.FileInputStream
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.util.Properties
buildscript {
repositories {
mavenCentral()
maven {
url = uri("https://dl.bintray.com/kotlin/kotlinx")
}
}
}
object DependencyVersions {
const val java_version = "11"
const val ktor_version = "1.3.0"
const val kotest_version = "4.0.4"
const val jlink_version = "2.17.7"
const val jfoenix_version = "9.0.9"
const val commons_lang3_version = "3.5"
const val jnativehook_version = "2.1.0"
const val log4j_version = "1.2.17"
const val slf4j_version = "1.7.5"
const val fontawesomefx_fontawesome_version = "4.7.0-9.1.2"
const val fontawesomefx_commons_version = "9.1.2"
const val opencv_version = "4.3.0-1"
const val commons_io_version = "2.6"
const val jackson_module_kotlin_version = "2.10.3"
}
plugins {
application
java
idea
id("org.jetbrains.kotlin.jvm") version "1.3.72"
id("org.openjfx.javafxplugin") version "0.0.8"
id("org.beryx.jlink") version "2.17.7"
id("org.gradle.kotlin.kotlin-dsl") version "1.3.1"
}
val applicationProperties = Properties()
applicationProperties.load(FileInputStream("src/main/resources/system/application.properties"))
val title = applicationProperties.getProperty("application.title")
project.version = applicationProperties.getProperty("application.version")
project.description = applicationProperties.getProperty("application.description")
group = "com.patres"
application {
mainClassName = "automationBoot/com.patres.automation.ApplicationLauncher"
}
val runArgsValue = listOf(
"--add-opens=java.base/java.lang=opencv",
"--add-exports=javafx.controls/com.sun.javafx.scene.control.behavior=com.jfoenix",
"--add-exports=javafx.controls/com.sun.javafx.scene.control=com.jfoenix",
"--add-opens=javafx.controls/javafx.scene.control=automationBoot",
"--add-opens=javafx.graphics/javafx.scene=automationBoot",
"--add-opens=javafx.graphics/javafx.scene.control=automationBoot"
)
javafx {
version = "11.0.2"
modules("javafx.controls", "javafx.fxml", "javafx.swing")
}
repositories {
mavenCentral()
maven {
url = uri("https://dl.bintray.com/kotlin/kotlinx")
}
}
dependencies {
testImplementation("io.kotest:kotest-runner-junit5-jvm:${DependencyVersions.kotest_version}")
testImplementation("io.kotest:kotest-assertions-core-jvm:${DependencyVersions.kotest_version}")
implementation("com.jfoenix:jfoenix:${DependencyVersions.jfoenix_version}")
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.3.72")
implementation("org.apache.commons:commons-lang3:${DependencyVersions.commons_lang3_version}")
implementation("com.1stleg:jnativehook:${DependencyVersions.jnativehook_version}")
implementation("log4j:log4j:${DependencyVersions.log4j_version}")
implementation("org.slf4j:slf4j-api:${DependencyVersions.slf4j_version}")
implementation("org.slf4j:slf4j-log4j12:${DependencyVersions.slf4j_version}")
implementation("de.jensd:fontawesomefx-fontawesome:${DependencyVersions.fontawesomefx_fontawesome_version}")
implementation("de.jensd:fontawesomefx-commons:${DependencyVersions.fontawesomefx_commons_version}")
implementation("commons-io:commons-io:${DependencyVersions.commons_io_version}")
implementation("org.openpnp:opencv:${DependencyVersions.opencv_version}")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:${DependencyVersions.jackson_module_kotlin_version}")
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = DependencyVersions.java_version
}
tasks.named<JavaExec>("run") {
doFirst {
jvmArgs = runArgsValue
}
}
//
//tasks.jlink {
// addExtraDependencies("javafx")
// mergedModule {
// additive = true
// uses "kotlin.reflect.jvm.internal.impl.util.ModuleVisibilityHelper"
// uses "kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition"
// uses "kotlin.reflect.jvm.internal.impl.builtins.BuiltInsLoader"
// }
//
// launcher {
// name = title
// jvmArgs = runArgsValue
// }
//
// jpackage {
// installerType", "exe"
// appVersion = project.version
// outputDir", "../release/${project.version}"
// installerOptions = [
// "--description", description,
// "--copyright", "Copyrigth 2020 Patres - Patryk Piechaczek"
// ]
// imageOptions += ["--icon", "src/main/resources/icon/desktop/main_icon.ico"]
// if (installerType == "exe") {
// installerOptions += [
// "--win-dir-chooser",
// "--win-menu",
// "--win-shortcut"
// ]
// }
// }
//}
tasks.withType<Test> {
useJUnitPlatform()
}
// Create Installer =======================================
task("createInstaller") {
doFirst {
println("Create Installer")
}
doLast {
println("Remove unused installer directory")
val isDeleted = project.delete(files("${rootDir}\\release\\${project.version}\\$title"))
println("Directory is deleted: $isDeleted")
}
}
//createInstaller.dependsOn jpackage
// ========================================================