From 776e8e5c16e228fb67d9d2c9a7f3d378c88c9498 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Thu, 10 Oct 2024 20:34:03 +0200 Subject: [PATCH] Add java files --- .envrc | 2 + .gitignore | 3 + .idea/modules.xml | 8 ++ flake.lock | 61 ++++++++++ flake.nix | 24 ++++ pom.xml | 105 ++++++++++++++++++ .../java/fr/mrdev023/vulkan_java/App.java | 10 ++ .../java/fr/mrdev023/vulkan_java/AppTest.java | 19 ++++ vulkan_java.iml | 9 ++ 9 files changed, 241 insertions(+) create mode 100644 .envrc create mode 100644 .idea/modules.xml create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 pom.xml create mode 100644 src/main/java/fr/mrdev023/vulkan_java/App.java create mode 100644 src/test/java/fr/mrdev023/vulkan_java/AppTest.java create mode 100644 vulkan_java.iml diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..e3fecb3 --- /dev/null +++ b/.envrc @@ -0,0 +1,2 @@ +use flake + diff --git a/.gitignore b/.gitignore index e69de29..b6f4823 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,3 @@ +.direnv +.mvn +target \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..ec6e86d --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..ade8d2e --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1728538411, + "narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e960d40 --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + description = "Portfolio hugo configuration"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachSystem flake-utils.lib.allSystems (system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + devShells = { + default = pkgs.mkShell { + packages = with pkgs; [ + jdk23 # When available + maven + ]; + }; + }; + }); +} diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..54d4c2d --- /dev/null +++ b/pom.xml @@ -0,0 +1,105 @@ + + + 4.0.0 + + fr.mrdev023.vulkan_java + vulkan_java + 1.0-SNAPSHOT + + vulkan_java + + http://www.example.com + + + UTF-8 + 22 + + + + + + org.junit + junit-bom + 5.11.0 + pom + import + + + org.lwjgl + lwjgl + 3.2.3 + + + org.lwjgl + lwjgl-glfw + 3.2.3 + + + org.lwjgl + lwjgl-vulkan + 3.2.3 + + + + + + + org.junit.jupiter + junit-jupiter-api + test + + + + org.junit.jupiter + junit-jupiter-params + test + + + + + + + + + maven-clean-plugin + 3.4.0 + + + + maven-resources-plugin + 3.3.1 + + + maven-compiler-plugin + 3.13.0 + + + maven-surefire-plugin + 3.3.0 + + + maven-jar-plugin + 3.4.2 + + + maven-install-plugin + 3.1.2 + + + maven-deploy-plugin + 3.1.2 + + + + maven-site-plugin + 3.12.1 + + + maven-project-info-reports-plugin + 3.6.1 + + + + + diff --git a/src/main/java/fr/mrdev023/vulkan_java/App.java b/src/main/java/fr/mrdev023/vulkan_java/App.java new file mode 100644 index 0000000..973e61d --- /dev/null +++ b/src/main/java/fr/mrdev023/vulkan_java/App.java @@ -0,0 +1,10 @@ +package fr.mrdev023.vulkan_java; + +/** + * Hello world! + */ +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); + } +} diff --git a/src/test/java/fr/mrdev023/vulkan_java/AppTest.java b/src/test/java/fr/mrdev023/vulkan_java/AppTest.java new file mode 100644 index 0000000..9940692 --- /dev/null +++ b/src/test/java/fr/mrdev023/vulkan_java/AppTest.java @@ -0,0 +1,19 @@ +package fr.mrdev023.vulkan_java; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; + +/** + * Unit test for simple App. + */ +public class AppTest { + + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() { + assertTrue(true); + } +} diff --git a/vulkan_java.iml b/vulkan_java.iml new file mode 100644 index 0000000..be3cc78 --- /dev/null +++ b/vulkan_java.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file