diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..2ed72b3725a0b3776f6bf47f079c45ff951ffa76 --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,7 @@ +FROM gitpod/workspace-full-vnc + +USER gitpod + +RUN bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh \ + && sdk install java 15.0.1.j9-adpt \ + && sdk default java 15.0.1.j9-adpt" diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000000000000000000000000000000000000..3efa458527711e67f91421c1ddaa6432434d0677 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,6 @@ +image: + file: .gitpod.Dockerfile + +tasks: + - init: sdk use java 15.0.1.j9-adpt + command: 'echo "TODO: Replace with command to start project"' diff --git a/README.md b/README.md index 1ce757515955ca14e6ff1f075472a7a970e6ba1b..256299fcf3be8cc2c028455cef0e9c7bff784bad 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[](https://gitpod.io/#https://gitlab.stud.idi.ntnu.no/tdt4100/v2021/students) + # Student-repo TDT4100 V2021 Dette repoet inneholder prosjekter for bruk i faget TDT4100 - Objektorientert Programmering. @@ -7,3 +9,4 @@ Følgende prosjekter er definert: * __minegenkode__: Her kan du lagre din egen kode, som ikke nødvendigvis har noe med faget å gjøre * __lf__: Her kommer løsningsforslag for øvingene * __ovinger__: Her skal du skrive kode for øvingene i faget. Tester for øvingene kommer også her. +* __todolist-example__: Eksempel på mini-app-prosjekt diff --git a/todolist-example/pom.xml b/todolist-example/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..7b53aa93ba005c98142ab4225e7f52f1f4d92d47 --- /dev/null +++ b/todolist-example/pom.xml @@ -0,0 +1,45 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>tdt4100-v2021</groupId> + <artifactId>todolist-example</artifactId> + <version>0.0.1-SNAPSHOT</version> + + <dependencies> + <!-- JavaFX FXML --> + <dependency> + <groupId>org.openjfx</groupId> + <artifactId>javafx-fxml</artifactId> + <version>16-ea+5</version> + </dependency> + + <!-- JUnit 5 --> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-engine</artifactId> + <version>5.7.0</version> + </dependency> + + </dependencies> + + <build> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.0</version> + <configuration> + <release>15</release> + <compilerArgs> + --enable-preview + </compilerArgs> + </configuration> + </plugin> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <version>3.0.0-M5</version> + <configuration> + <argLine>--enable-preview</argLine> + </configuration> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file diff --git a/todolist-example/src/main/java/module-info.java b/todolist-example/src/main/java/module-info.java new file mode 100644 index 0000000000000000000000000000000000000000..52d1555143ae4a883a7bb5fa5da970c8262006d9 --- /dev/null +++ b/todolist-example/src/main/java/module-info.java @@ -0,0 +1,10 @@ +/** + * @author hal + * + */ +open module todolist { + requires javafx.base; + requires javafx.controls; + requires javafx.fxml; + requires javafx.graphics; +} diff --git a/todolist-example/src/main/java/todolist/model/TodoList.java b/todolist-example/src/main/java/todolist/model/TodoList.java new file mode 100644 index 0000000000000000000000000000000000000000..9217051427961c3409bfaff011c37dbc4616243f --- /dev/null +++ b/todolist-example/src/main/java/todolist/model/TodoList.java @@ -0,0 +1,8 @@ +package todolist.model; + +public class TodoList { + + private String name; + + private List<String> entries; +} \ No newline at end of file