File tree 3 files changed +12
-14
lines changed
ui/kotlinx-coroutines-javafx
3 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ if (build_snapshot_train) {
227
227
* but publishing plugin does not re-read artifact names for kotlin-jvm projects, so renaming is not applied in pom files
228
228
* for JVM-only projects.
229
229
*
230
- * We artificially replace "project" dependency with "module" one to have proper names in pom files, but then substitute it
230
+ * We artificially replace "project" dependency with "module" one to have proper names in pom files, but then substitute it
231
231
* to have out "project" dependency back.
232
232
*/
233
233
configure(subprojects. findAll { it. name != coreModule && it. name != rootModule }) {
@@ -278,11 +278,8 @@ println("Using Kotlin compiler version: $org.jetbrains.kotlin.config.KotlinCompi
278
278
// --------------- Publish only from under JDK11+ ---------------
279
279
task checkJdkForPublish {
280
280
doFirst {
281
- String javaVersion = System . properties[" java.version" ]
282
- int i = javaVersion. indexOf(' .' )
283
- int javaVersionMajor = (i < 0 ? javaVersion : javaVersion. substring(0 , i)). toInteger()
284
- if (javaVersionMajor < 11 ) {
285
- throw new GradleException (" Project can be build for publishing only under JDK 11+, but found ${ javaVersion} " )
281
+ if (JavaVersionKt . javaVersionMajor < 11 ) {
282
+ throw new GradleException (" Project can be build for publishing only under JDK 11+, but found ${ JavaVersionKt.javaVersion} " )
286
283
}
287
284
}
288
285
}
Original file line number Diff line number Diff line change
1
+ val javaVersion: String
2
+ get() = System .getProperty(" java.version" )!!
3
+
4
+ val javaVersionMajor: Int
5
+ get() = javaVersion
6
+ .substringBefore(" ." )
7
+ .toInt()
Original file line number Diff line number Diff line change 2
2
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
3
*/
4
4
5
- static int javaVersionMajor () {
6
- String javaVersion = System . properties[" java.version" ]
7
- int i = javaVersion. indexOf(' .' )
8
- return (i < 0 ? javaVersion : javaVersion. substring(0 , i)). toInteger()
9
- }
10
-
11
5
// JDK11+ does not bundle JavaFx and the plugin for JavaFx support is compiled with class file version 55.0 (JDK 11)
12
- if (javaVersionMajor() >= 11 ) {
6
+ if (JavaVersionKt . javaVersionMajor >= 11 ) {
13
7
apply plugin : ' org.openjfx.javafxplugin'
14
-
8
+
15
9
javafx {
16
10
version = javafx_version
17
11
modules = [' javafx.controls' ]
You can’t perform that action at this time.
0 commit comments