-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dungeon: add support for editing and managing of dsl files ("task man…
…ager") (#1611) Der Task Manager ist im Rahmen der Bachelorarbeit von @mpeters4 entstanden und wird als Kotlin-Projekt in diesem PR in das Dungeon-Projekt integriert. Mit dem Task Manager können DSL-Dateien komfortabel außerhalb einer IDE bearbeitet und geladen werden, es steht sogar ein Syntaxhighlighting zur Verfügung. Im Gegensatz zum [LSP-Support](dsl-ide-support-with-lsp/) (#1601) sollte dieses Sub-Projekt mittelfristig fest in den Dungeon-DSL-Starter integriert werden, damit informatikfremde Nutzende einfacher mit den Aufgabendefinition in den DSL-Dateien umgehen können. (Der LSP-Support sollte als separates Sub-Projekt weitergeführt werden, da es hier um die IDE-Unterstützung geht.) --- Todo vor dem Merge: - [x] Anpassen des Haupt-Readme (Lizenzen) Todo nach dem Merge: - [ ] ~~Einbinden als Gradle-Sub-Projekt im Haupt-Dungeon-Projekt~~ (#1615) - [ ] ~~Anpassen der Ordnerstruktur und Hilfs-/Konfig-Dateien an die anderen Gradle-Sub-Projekte~~ (#1616) - [ ] ~~Anpassen des Haupt-Readme (Erwähnung des Projekts)~~ (#1617) - [ ] ~~Ausschließen von Checkstyle und Spotless (Kotlin-Code)~~ (#1618) Mittelfristig: - [ ] ~~Umbauen auf Java (?) => https://codeconverter.io/convert/kotlin-to-java (?) https://stackoverflow.com/questions/34957430/how-to-convert-a-kotlin-source-file-to-a-java-source-file (?)~~ (#1619) - [ ] ~~Bereitstellen im JAR des Dungeon-DSL-Starters: Beim Starten des Dungeons kommt nicht der Auswahldialog für die DSL-Dateien, sondern @mpeters4's schicke GUI und von dort kann man dann Dateien laden, editieren, speichern, ...~~ (#1620) --------- Co-authored-by: Carsten Gips <[email protected]>
- Loading branch information
Showing
105 changed files
with
7,621 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Apache License 2.0 | ||
|
||
======================================================================= | ||
|
||
Copyright (c) 2023 Composable Horizons LLC. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
Task_Management_Dungeon/.idea/uiDesigner.xml | ||
*.xml | ||
Task_Management_Dungeon/.idea/gradle.xml | ||
Task_Management_Dungeon/.idea/gradle.xml | ||
Task_Management_Dungeon/gradle/wrapper/gradle-wrapper.jar | ||
Task_Management_Dungeon/gradle/wrapper/gradle-wrapper.jar | ||
Task_Management_Dungeon/gradle/wrapper/gradle-wrapper.jar | ||
Task_Management_Dungeon/task_manager.db | ||
Task_Management_Dungeon/Dungeon_Files/Test.dng | ||
*.dng |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Michael Peters | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Dies is eine Software zur Verwaltung von Aufgaben im Dungeon. | ||
Die Erstellung erfolgt im Rahmen meiner Bachelorarbeit. | ||
|
||
Folgende externe Bibliotheken stehen unter einer anderen Lizenz (Apache 2.0): | ||
|
||
[Material Symbols for Jetpack Compose (Ordner: Task_Management_Dungeon\src\main\kotlin\icon)](https://www.composables.com/icons) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.gradle | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### IntelliJ IDEA ### | ||
.idea/modules.xml | ||
.idea/jarRepositories.xml | ||
.idea/compiler.xml | ||
.idea/libraries/ | ||
*.iws | ||
*.iml | ||
*.ipr | ||
out/ | ||
!**/src/main/**/out/ | ||
!**/src/test/**/out/ | ||
|
||
### Eclipse ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
bin/ | ||
!**/src/main/**/bin/ | ||
!**/src/test/**/bin/ | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
### Mac OS ### | ||
.DS_Store |
88 changes: 88 additions & 0 deletions
88
dungeon-task-manager/Task_Management_Dungeon/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat | ||
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType | ||
|
||
plugins { | ||
kotlin("jvm") | ||
id("org.jetbrains.compose") | ||
id("app.cash.sqldelight") version "2.0.1" | ||
} | ||
|
||
group = "org.example" | ||
version = "1.0-SNAPSHOT" | ||
|
||
//Set Compiler to Java 21.01 | ||
compose { | ||
kotlinCompilerPlugin.set("androidx.compose.compiler:compiler:1.5.7") | ||
} | ||
|
||
kotlin{ | ||
|
||
sourceSets{ | ||
main{ | ||
dependencies{ | ||
// implementation("app.cash.sqldelight:native-driver:2.0.1") | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") | ||
google() | ||
} | ||
|
||
|
||
dependencies { | ||
val voyagerVersion = "1.0.0" | ||
// Note, if you develop a library, you should use compose.desktop.common. | ||
// compose.desktop.currentOs should be used in launcher-sourceSet | ||
// (in a separate module for demo project and in testMain). | ||
// With compose.desktop.common you will also lose @Preview functionality | ||
implementation(compose.desktop.currentOs) | ||
|
||
// Navigator Copyright (c) 2021 Adriel Café | ||
implementation("cafe.adriel.voyager:voyager-navigator:$voyagerVersion") | ||
|
||
// Screen Model Copyright (c) 2021 Adriel Café | ||
implementation("cafe.adriel.voyager:voyager-screenmodel:$voyagerVersion") | ||
|
||
// BottomSheetNavigator Copyright (c) 2021 Adriel Café | ||
implementation("cafe.adriel.voyager:voyager-bottom-sheet-navigator:$voyagerVersion") | ||
|
||
// TabNavigator Copyright (c) 2021 Adriel Café | ||
implementation("cafe.adriel.voyager:voyager-tab-navigator:$voyagerVersion") | ||
|
||
// Transitions Copyright (c) 2021 Adriel Café | ||
implementation("cafe.adriel.voyager:voyager-transitions:$voyagerVersion") | ||
|
||
//Material 3 | ||
implementation("org.jetbrains.compose.material3:material3-desktop:1.6.0") | ||
//SQLdelight | ||
implementation("app.cash.sqldelight:sqlite-driver:2.0.1") | ||
implementation("app.cash.sqldelight:coroutines-extensions:2.0.1") | ||
|
||
implementation("org.slf4j:slf4j-nop:1.7.25") | ||
|
||
} | ||
|
||
//Database | ||
sqldelight { | ||
databases { | ||
create("Database") { | ||
packageName.set("Task_Management_Dungeon") | ||
} | ||
} | ||
} | ||
|
||
compose.desktop { | ||
application { | ||
mainClass = "MainKt" | ||
|
||
nativeDistributions { | ||
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) | ||
packageName = "Task_Management_Dungeon" | ||
packageVersion = "1.0.0" | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
dungeon-task-manager/Task_Management_Dungeon/gradle.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 | ||
kotlin.code.style=official | ||
kotlin.version=1.9.20 | ||
compose.version=1.5.10 |
7 changes: 7 additions & 0 deletions
7
dungeon-task-manager/Task_Management_Dungeon/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
13 changes: 13 additions & 0 deletions
13
dungeon-task-manager/Task_Management_Dungeon/settings.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
pluginManagement { | ||
repositories { | ||
gradlePluginPortal() | ||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") | ||
} | ||
|
||
plugins { | ||
kotlin("jvm").version(extra["kotlin.version"] as String) | ||
id("org.jetbrains.compose").version(extra["compose.version"] as String) | ||
} | ||
} | ||
|
||
rootProject.name = "Task_Management_Dungeon" |
Oops, something went wrong.