diff --git a/.gitignore b/.gitignore index 1b6985c..68f70f3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ # Ignore Gradle build output directory build + +# Ignore bin +bin diff --git a/Api/.gitignore b/Api/.gitignore new file mode 100644 index 0000000..68f70f3 --- /dev/null +++ b/Api/.gitignore @@ -0,0 +1,8 @@ +# Ignore Gradle project-specific cache directory +.gradle + +# Ignore Gradle build output directory +build + +# Ignore bin +bin diff --git a/Api/bin/main/edu/inventorym/Api.class b/Api/bin/main/edu/inventorym/Api.class new file mode 100644 index 0000000..f0fe5ba Binary files /dev/null and b/Api/bin/main/edu/inventorym/Api.class differ diff --git a/Model/.gitignore b/Model/.gitignore new file mode 100644 index 0000000..68f70f3 --- /dev/null +++ b/Model/.gitignore @@ -0,0 +1,8 @@ +# Ignore Gradle project-specific cache directory +.gradle + +# Ignore Gradle build output directory +build + +# Ignore bin +bin diff --git a/Ui/.gitignore b/Ui/.gitignore new file mode 100644 index 0000000..68f70f3 --- /dev/null +++ b/Ui/.gitignore @@ -0,0 +1,8 @@ +# Ignore Gradle project-specific cache directory +.gradle + +# Ignore Gradle build output directory +build + +# Ignore bin +bin diff --git a/Ui/.vscode/settings.json b/Ui/.vscode/settings.json new file mode 100644 index 0000000..7b016a8 --- /dev/null +++ b/Ui/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.compile.nullAnalysis.mode": "automatic" +} \ No newline at end of file diff --git a/UiView/.gitignore b/UiView/.gitignore new file mode 100644 index 0000000..68f70f3 --- /dev/null +++ b/UiView/.gitignore @@ -0,0 +1,8 @@ +# Ignore Gradle project-specific cache directory +.gradle + +# Ignore Gradle build output directory +build + +# Ignore bin +bin diff --git a/UiView/build.gradle b/UiView/build.gradle new file mode 100644 index 0000000..53bd8f7 --- /dev/null +++ b/UiView/build.gradle @@ -0,0 +1,84 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * This is a general purpose Gradle build. + * Learn more about Gradle by exploring our Samples at https://docs.gradle.org/8.14.3/samples + * This project uses @Incubating APIs which are subject to change. + */ + +plugins { + id 'java' + id 'application' + id 'org.openjfx.javafxplugin' version '0.1.0' +} + +group = 'lodge' +version = '1.0' + +// Apply a specific Java toolchain to ease working on different environments. +java { + toolchain { + languageVersion = JavaLanguageVersion.of(25) + } +} + +application { + mainClass = 'edu.inventorym.ApplicationView' +} + +sourceSets { + main { + java { + srcDirs = ['src/main/java'] + } + resources { + srcDirs = ['src/resources/media'] + } + } + test { + java { + srcDirs = ['src/test/java'] + } + runtimeClasspath = files("$projectDir/libs/*.jars") + } +} + +repositories { + mavenCentral() + fileTree(dir:'libs', include:'*.jar') +} + +javafx { + version = "25" + modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.graphics', 'javafx.web' ] +} + +dependencies { + + //https://mvnrepository.com/artifact/com.google.code.gson/gson + implementation 'com.google.code.gson:gson:2.13.2' + implementation 'org.openjfx:javafx-base:25.0.1' + implementation 'org.openjfx:javafx-fxml:25.0.1' + implementation 'org.openjfx:javafx-controls:25.0.1' + implementation 'org.openjfx:javafx-graphics:25.0.1' + implementation 'org.openjfx:javafx-web:25.0.1' + implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.17' + implementation group: 'org.slf4j', name: 'slf4j-simple', version: '2.0.17' +} + +jar { + manifest { + attributes 'Main-Class': application.mainClass + } + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } +} + +tasks.named('jar') { + manifest { + attributes('Implementation-Title': 'edu.inventorym.UiView', + 'Implementation-Version': 1.0, + 'Main-Class': application.mainClass, + 'Class-Path': 'lodge.reservationsystem javafx.base javafx.fxml javafx.controls javafx.graphics javafx.web com.google.gson .' ) + } +} diff --git a/UiView/src/main/java/edu/inventorym/ApplicationView.java b/UiView/src/main/java/edu/inventorym/ApplicationView.java new file mode 100644 index 0000000..c4870f5 --- /dev/null +++ b/UiView/src/main/java/edu/inventorym/ApplicationView.java @@ -0,0 +1,27 @@ +package edu.inventorym; + +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.stage.Stage; + +public class ApplicationView extends Application { + @Override + public void start(Stage primaryStage) { + try { + primaryStage.setTitle("Lodge ReservationSystem"); + Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("mainViewModel.fxml")); + Scene scene = new Scene(root, 800, 600); + primaryStage.setScene(scene); + primaryStage.show(); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + public static void main(String[] args) { + launch(args); + } +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 13ea95a..1ff5f20 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,4 +7,5 @@ plugins { rootProject.name = 'inventorym' include('Model') include('Api') - +include('Ui') +include('UiView')