Fix canvasfx module with Java FX 17

This commit is contained in:
aNNiMON 2023-08-28 15:55:04 +03:00 committed by Victor Melnik
parent b88207175e
commit 8ed89c8a9d
4 changed files with 32 additions and 6 deletions

View File

@ -0,0 +1,23 @@
plugins {
id 'java-library'
id 'org.openjfx.javafxplugin' version '0.0.14'
}
group = 'com.annimon.module'
version = '2.0-SNAPSHOT'
javafx {
version = "17"
modules = [ 'javafx.controls', 'javafx.swing' ]
}
dependencies {
api project(":ownlang-core")
testImplementation platform("org.junit:junit-bom:${versions.junit}")
testImplementation 'org.junit.jupiter:junit-jupiter'
}
test {
useJUnitPlatform()
}

View File

@ -1,6 +1,6 @@
package com.annimon.ownlang.modules.canvasfx;
/*import com.annimon.ownlang.exceptions.TypeException;
import com.annimon.ownlang.exceptions.TypeException;
import com.annimon.ownlang.lib.*;
import com.annimon.ownlang.modules.Module;
import static com.annimon.ownlang.lib.Converters.*;
@ -37,15 +37,15 @@ import javafx.scene.shape.FillRule;
import javafx.scene.shape.StrokeLineCap;
import javafx.scene.shape.StrokeLineJoin;
import javafx.scene.text.TextAlignment;
import javax.swing.JFrame;*/
import javax.swing.JFrame;
/**
*
* @author aNNiMON
*/
public final class canvasfx /*implements Module*/ {
public final class canvasfx implements Module {
/*private static final int FX_EFFECT_TYPE = 5301;
private static final int FX_EFFECT_TYPE = 5301;
private static final int FX_COLOR_TYPE = 5302;
private static JFrame frame;
@ -1112,6 +1112,6 @@ public final class canvasfx /*implements Module*/ {
map.set("isConsumed", NumberValue.fromBoolean(e.isConsumed()));
map.set("isDropCompleted", NumberValue.fromBoolean(e.isDropCompleted()));
handler.execute(map);
}*/
}
}

View File

@ -17,6 +17,7 @@ dependencies {
implementation project(":ownlang-parser")
implementation project(":ownlang-utils")
implementation project(":modules:main")
implementation project(":modules:canvasfx")
testImplementation platform("org.junit:junit-bom:${versions.junit}")
testImplementation 'org.junit.jupiter:junit-jupiter'

View File

@ -7,3 +7,5 @@ include 'ownlang-utils'
include 'modules:main'
findProject(':modules:main')?.name = 'main'
include 'modules:canvasfx'
findProject(':modules:canvasfx')?.name = 'canvasfx'