2021-08-22

This commit is contained in:
2021-08-22 17:22:34 +09:00
parent 6dd1d5bd69
commit a3f4fec8b6
13 changed files with 98 additions and 29 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@
/buildSrc/build/ /buildSrc/build/
/.idea/ /.idea/
/build/ /build/
/**/build/

View File

@@ -1,10 +0,0 @@
plugins {
id("elex-application")
}
application{
mainClass.set("com.elex_project.sample.Application")
}
dependencies {
}

View File

@@ -1 +0,0 @@
package com.elex_project.sample;

View File

@@ -4,11 +4,13 @@ buildscript {
url = uri("https://repository.elex-project.com/repository/maven") url = uri("https://repository.elex-project.com/repository/maven")
} }
} }
}
dependencies {
classpath ("com.jaredsburrows:gradle-license-plugin:0.8.90")
}
}
plugins { plugins {
base
id("com.github.ben-manes.versions") version "0.39.0" id("com.github.ben-manes.versions") version "0.39.0"
} }
subprojects{
}

View File

@@ -10,8 +10,7 @@ tasks.jar {
"Implementation-Title" to project.name, "Implementation-Title" to project.name,
"Implementation-Version" to project.version, "Implementation-Version" to project.version,
"Implementation-Vendor" to "ELEX co.,pte.", "Implementation-Vendor" to "ELEX co.,pte.",
"Main-Class" to application.mainClass, "Main-Class" to application.mainClass
"Automatic-Module-Name" to "com.elex_project.${project.name}"
)) ))
} }
} }

View File

@@ -15,8 +15,8 @@ repositories {
java { java {
withSourcesJar() withSourcesJar()
withJavadocJar() withJavadocJar()
sourceCompatibility = org.gradle.api.JavaVersion.VERSION_1_8 sourceCompatibility = org.gradle.api.JavaVersion.VERSION_11
targetCompatibility = org.gradle.api.JavaVersion.VERSION_1_8 targetCompatibility = org.gradle.api.JavaVersion.VERSION_11
} }
configurations { configurations {
@@ -54,7 +54,7 @@ tasks.javadoc {
dependencies { dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar")))) implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation("org.slf4j:slf4j-api:1.7.30") implementation("org.slf4j:slf4j-api:1.7.30")
implementation("org.jetbrains:annotations:21.0.1") implementation("org.jetbrains:annotations:22.0.0")
compileOnly("org.projectlombok:lombok:1.18.20") compileOnly("org.projectlombok:lombok:1.18.20")
annotationProcessor("org.projectlombok:lombok:1.18.20") annotationProcessor("org.projectlombok:lombok:1.18.20")

17
fxml/build.gradle.kts Normal file
View File

@@ -0,0 +1,17 @@
plugins {
id("elex-application")
id("org.openjfx.javafxplugin") version "0.0.10"
id("org.beryx.jlink") version "2.23.1"
}
application {
mainClass.set("kr.pe.elex.examples.fxml.FxmlApplication")
mainModule.set("kr.pe.elex.examples.fxml")
}
javafx {
version = "11.0.2"
modules = listOf("javafx.controls", "javafx.fxml")
}
dependencies {
}

View File

@@ -0,0 +1,28 @@
package kr.pe.elex.examples.fxml;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.util.Objects;
public class FxmlApplication extends Application {
public static void main(String... args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setTitle("Hello!");
primaryStage.setWidth(800);
primaryStage.setHeight(600);
//GridPane root = new GridPane();
Parent root = FXMLLoader.load(Objects.requireNonNull(getClass()
.getResource("/fxml/root.fxml")));
Scene scene = new Scene(root);
primaryStage.setScene(scene);
primaryStage.show();
}
}

View File

@@ -0,0 +1,7 @@
module javafx.examples.fxml.main {
requires javafx.graphics;
requires javafx.controls;
requires javafx.fxml;
exports kr.pe.elex.examples.fxml;
}

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1">
<center>
<Button mnemonicParsing="false" text="Button" BorderPane.alignment="CENTER" />
</center>
<bottom>
</bottom>
<top>
<MenuBar BorderPane.alignment="CENTER">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" text="Close" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Edit">
<items>
<MenuItem mnemonicParsing="false" text="Delete" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="About" />
</items>
</Menu>
</menus>
</MenuBar>
</top>
</BorderPane>

View File

@@ -1,7 +0,0 @@
plugins {
id("elex-library")
}
dependencies {
}

View File

@@ -1 +0,0 @@
package com.elex_project.sample;

View File

@@ -1,2 +1,2 @@
rootProject.name = "javafx-examples" rootProject.name = "javafx-examples"
include("lib", "app") include("fxml")