@@ -2,21 +2,18 @@ import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
22import org.jetbrains.kotlin.gradle.dsl.JvmTarget
33
44buildscript {
5- ext. kotlinVersion = ' 2.2.0'
6- repositories {
7- mavenCentral()
8- }
5+ ext. kotlinVersion = " 2.2.0"
96}
107
118plugins {
12- id ' java'
13- id ' application'
14- id ' org.jetbrains.kotlin.jvm' version " $kotlinVersion "
15- id ' org.openjfx.javafxplugin' version ' 0.1.0'
9+ id " java"
10+ id " application"
11+ id " org.jetbrains.kotlin.jvm" version " $kotlinVersion "
12+ id " org.openjfx.javafxplugin" version " 0.1.0"
1613 id " org.jetbrains.dokka" version " 2.0.0"
1714}
1815
19- group ' ru.nucodelabs'
16+ group " ru.nucodelabs"
2017
2118java {
2219 sourceCompatibility = JavaVersion . VERSION_21
@@ -34,18 +31,18 @@ ext {
3431 // For deps
3532 def osName = currentOS. isWindows() ? " windows" : currentOS. isMacOsX() ? " macosx" : " linux"
3633 def archName = currentArch. isArm64() && ! currentOS. isWindows() ? " arm64" : " x86_64"
37- set ' platform' , " $osName -$archName "
34+ set " platform" , " $osName -$archName "
3835
3936 println " OS: ${ currentOS.name} "
4037 println " OS VERSION: ${ System.getProperty("os.version")} "
4138 println " ARCHITECTURE: ${ currentArch.name} "
4239 println " CLASSIFIER: ${ platform} "
4340
44- set ' runDir' , " $projectDir /.run"
41+ set " runDir" , " $projectDir /.run"
4542
4643 /* Dependency versions */
47- set ' logbackVersion' , " 1.5.18"
48- set ' guiceVersion' , ' 7.0.0'
44+ set " logbackVersion" , " 1.5.18"
45+ set " guiceVersion" , " 7.0.0"
4946}
5047
5148processResources {
@@ -72,25 +69,25 @@ compileTestKotlin {
7269}
7370
7471tasks. withType(JavaCompile ). configureEach {
75- options. encoding = ' UTF-8'
72+ options. encoding = " UTF-8"
7673}
7774
7875application {
79- mainClass = ' ru.nucodelabs.gem.app.StartGemApplication'
76+ mainClass = " ru.nucodelabs.gem.app.StartGemApplication"
8077}
8178
8279javafx {
83- version = ' 23 '
84- modules = [' javafx.controls' , ' javafx.fxml' , ' javafx.graphics' , ' javafx.swing' ]
80+ version = " 23 "
81+ modules = [" javafx.controls" , " javafx.fxml" , " javafx.graphics" , " javafx.swing" ]
8582}
8683
8784dependencies {
8885 /* Versions */
89- final junitVersion = ' 5.9.2'
90- final jacksonVersion = ' 2.19.2'
86+ final junitVersion = " 5.9.2"
87+ final jacksonVersion = " 2.19.2"
9188 final kotlinTestVersion = kotlinVersion
92- final mapstructVersion = ' 1.6.3'
93- final slf4jVersion = ' 2.0.17'
89+ final mapstructVersion = " 1.6.3"
90+ final slf4jVersion = " 2.0.17"
9491
9592 implementation project(" :kfx-utils" )
9693 implementation project(" :common-utils" )
@@ -103,32 +100,30 @@ dependencies {
103100 " $projectDir /lib/${ System.mapLibraryName("MathVES")} "
104101 )
105102
106- implementation " org.slf4j:slf4j-api:${ slf4jVersion} "
103+ implementation( " org.slf4j:slf4j-api:${ slf4jVersion} " )
107104 implementation(" ch.qos.logback:logback-classic:$logbackVersion " )
108105 implementation project(" :app-logback-appender" )
109- implementation ' org.codehaus.janino:janino:3.1.12'
110- // implementation "org.slf4j:slf4j-jdk14:${slf4jVersion}"
111106
112107 implementation " org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion "
113- implementation ' org.hibernate.validator:hibernate-validator:8.0.0.Final'
108+ implementation " org.hibernate.validator:hibernate-validator:8.0.0.Final"
114109
115110 implementation " org.mapstruct:mapstruct:$mapstructVersion "
116111 annotationProcessor " org.mapstruct:mapstruct-processor:$mapstructVersion "
117112
118113 /* FXML script tag Groovy support */
119- implementation ' org.codehaus.groovy:groovy-jsr223:3.0.25'
114+ implementation " org.codehaus.groovy:groovy-jsr223:3.0.25"
120115
121- implementation group : ' com.fasterxml.jackson.core' , name : ' jackson-databind' , version : jacksonVersion
122- implementation group : ' org.apache.commons' , name : ' commons-math3' , version : ' 3.6.1'
116+ implementation group : " com.fasterxml.jackson.core" , name : " jackson-databind" , version : jacksonVersion
117+ implementation group : " org.apache.commons" , name : " commons-math3" , version : " 3.6.1"
123118
124- implementation group : ' com.google.inject' , name : ' guice' , version : guiceVersion
125- implementation group : ' org.tinfour' , name : ' TinfourCore' , version : ' 2.1.8'
119+ implementation group : " com.google.inject" , name : " guice" , version : guiceVersion
120+ implementation group : " org.tinfour" , name : " TinfourCore" , version : " 2.1.8"
126121 implementation " com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion "
127- implementation ' org.apache.commons:commons-collections4:4.4'
122+ implementation " org.apache.commons:commons-collections4:4.4"
128123
129124 /* Math Libraries */
130- implementation ' org.glassfish.expressly:expressly:5.0.0'
131- implementation ' com.github.haifengl:smile-core:4.4.0'
125+ implementation " org.glassfish.expressly:expressly:5.0.0"
126+ implementation " com.github.haifengl:smile-core:4.4.0"
132127 implementation " org.bytedeco:openblas:0.3.30-1.5.12:$platform "
133128 implementation " org.bytedeco:javacpp:1.5.12:$platform "
134129 implementation " org.bytedeco:arpack-ng:3.9.1-1.5.12:$platform "
@@ -144,42 +139,44 @@ dependencies {
144139
145140/* Setup Runtime */
146141
147- tasks. register(' prepareRunDir' ) {
142+ tasks. register(" prepareRunDir" ) {
148143 file(runDir). mkdirs()
149144}
150145
151- tasks. register(' copyLibsToRunDir' , Copy ) {
146+ tasks. register(" copyLibsToRunDir" , Copy ) {
152147 dependsOn prepareRunDir
153148 from " $projectDir /lib"
154149 into runDir
155150}
156151
157- tasks. register(' copyDataToRunDir' , Copy ) {
152+ tasks. register(" copyDataToRunDir" , Copy ) {
158153 dependsOn prepareRunDir
159154 from " $projectDir /data"
160155 into " $runDir /data"
161156}
162157
163- tasks. register(' copyClrToRunDir' , Copy ) {
158+ tasks. register(" copyClrToRunDir" , Copy ) {
164159 dependsOn prepareRunDir
165160 from " $projectDir /colormap/default.clr"
166161 into " $runDir /colormap"
167162}
168163
169- tasks. register(' cleanRunDir' , Delete ) {
164+ tasks. register(" cleanRunDir" , Delete ) {
170165 delete fileTree(runDir) { exclude " err-trace*.txt" }
171166}
172167
173168tasks. withType(JavaExec ). configureEach {
174169 dependsOn copyClrToRunDir, copyDataToRunDir, copyLibsToRunDir
175170 jvmArgs = moduleExportsJvmArgs
171+ systemProperty(" app.gem.log.stdout" , true )
176172 workingDir = file(runDir)
177173 finalizedBy cleanRunDir
178174}
179175
180176test {
181177 dependsOn copyClrToRunDir, copyDataToRunDir, copyLibsToRunDir
182178 workingDir = file(runDir)
179+ systemProperty(" app.gem.log.stdout" , true )
183180 useJUnitPlatform()
184181 finalizedBy cleanRunDir
185182}
@@ -189,8 +186,10 @@ test {
189186final jpackageInputDir = layout. buildDirectory. dir(" jars" ). get(). asFile. absolutePath
190187
191188tasks. register(" copyNativeDependencies" , Copy ) {
192- from file(" $projectDir /lib/${ System.mapLibraryName("MathVES_JNI")} " ),
189+ from(
190+ file(" $projectDir /lib/${ System.mapLibraryName("MathVES_JNI")} " ),
193191 file(" $projectDir /lib/${ System.mapLibraryName("MathVES")} " )
192+ )
194193 into(jpackageInputDir)
195194}
196195
0 commit comments