From 63981a664d18cb876d249ffb1960b84c9f6592d4 Mon Sep 17 00:00:00 2001 From: Natty <31473117+493msi@users.noreply.github.com> Date: Wed, 6 Apr 2022 11:01:41 +0200 Subject: [PATCH] Fixed backing path creation for the default filesystem and added a GitHub action --- .github/workflows/gradle-publish.yml | 39 +++++++++++++++++++ NEXT_RELEASE_DRAFT.md | 35 ++++++++--------- engine-core/build.gradle.kts | 38 ++++++++++++++++++ .../org/plutoengine/audio/al/AudioEngine.java | 7 ++-- .../filesystem/EnumBackingFileSystem.java | 3 +- 5 files changed, 98 insertions(+), 24 deletions(-) create mode 100755 .github/workflows/gradle-publish.yml diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml new file mode 100755 index 0000000..f29de7f --- /dev/null +++ b/.github/workflows/gradle-publish.yml @@ -0,0 +1,39 @@ +name: Gradle Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'temurin' + server-id: github + settings-path: ${{ github.workspace }} + + - name: Set up Gradle + uses: gradle/gradle-build-action@v2 + + - name: Execute Gradle build + run: | + chmod +x ./gradlew + ./gradlew :engine-core:build --stacktrace --info -x test + + - name: Publish to Vega + run: ./gradlew :engine-core:publish --stacktrace --info -x test + env: + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSWORD }} + ORG_GRADLE_PROJECT_vegaUsername: ${{ secrets.VEGA_USERNAME }} + ORG_GRADLE_PROJECT_vegaPassword: ${{ secrets.VEGA_PASSWORD }} diff --git a/NEXT_RELEASE_DRAFT.md b/NEXT_RELEASE_DRAFT.md index 457add6..0ec0753 100755 --- a/NEXT_RELEASE_DRAFT.md +++ b/NEXT_RELEASE_DRAFT.md @@ -1,8 +1,17 @@ ## Features targeted for 22.0.1.0-alpha.0 +* `[PlutoGUI]` Initial implementation of the new font renderer + * Full rewrite + * High quality font rendering + * Subpixel rendering support [?] + * Possibly a new system for bitmap fonts +* Improve upon the support of thread-local Pluto instances + * The long term goal is to allow an unlimited amount of Pluto applications at any given time + +## Features targeted for 22.0.1.0-alpha.1 * The stage subsystem * A "stage", in this context, is a set of assets bound together - by programming logic, not necessarily a game level. - Stage switching and asset management are handled by the engine. + by programming logic, not necessarily a game level. + Stage switching and asset management are handled by the engine. * Upon stage switch 1. Unload unused assets 2. Load new assets @@ -14,29 +23,19 @@ 2. Deferred switch * The stage will continue running until all assets load * Assets will load synchronously, but at a slower pace - to avoid frame stutter + to avoid frame stutter 3. Asynchronous switch * Assets will be loaded in asynchronously, where applicable - * Falls back to deferred switching for synchronous loading, - such as OpenGL texture upload + * Falls back to deferred switching for synchronous loading, + such as OpenGL texture upload * Automated asset loading * All asset management will eventually be handled by `PlutoCore` * This includes audio clips, textures, sprites * Add a common interface for all assets * Let the stage system handle audio playback * This API should be as neutral as possible and avoid steering towards - game-only use + game-only use * The stage manager should be relatively low-overhead and allow multiple - instances + instances * Allow stages to be inherited from, creating a stack-like structure -* `[PlutoAudio]` Integrate the Audio API with the Stage API -* `[PlutoGUI]` Initial implementation of the new font renderer - * Full rewrite - * High quality font rendering - * Subpixel rendering support [?] - * Possibly a new system for bitmap fonts -* Improve upon the support of thread-local Pluto instances - * The long term goal is to allow an unlimited amount of Pluto applications at any given time - -## Features targeted for 22.0.1.0-alpha.1 -* TBD \ No newline at end of file +* `[PlutoAudio]` Integrate the Audio API with the Stage API \ No newline at end of file diff --git a/engine-core/build.gradle.kts b/engine-core/build.gradle.kts index 0533665..7f43821 100755 --- a/engine-core/build.gradle.kts +++ b/engine-core/build.gradle.kts @@ -1,9 +1,26 @@ import org.plutoengine.Versions +task("publish") { + dependsOn(":plutoengine:plutouss2:publish") + dependsOn(":plutoengine:plutolib:publish") + dependsOn(":plutoengine:plutocomponent:publish") + dependsOn(":plutoengine:plutoruntime:publish") + dependsOn(":plutoengine:plutodisplay:publish") + dependsOn(":plutoengine:plutotexture:publish") + dependsOn(":plutoengine:plutomesher:publish") + dependsOn(":plutoengine:plutoshader:publish") + dependsOn(":plutoengine:plutoframebuffer:publish") + dependsOn(":plutoengine:plutospritesheet:publish") + dependsOn(":plutoengine:plutogui:publish") + dependsOn(":plutoengine:plutoaudio:publish") + dependsOn(":plutoengine:plutocore:publish") +} + subprojects { apply(plugin = "java") apply(plugin = "java-library") apply(plugin = "maven-publish") + apply(plugin = "signing") repositories { mavenCentral() @@ -28,5 +45,26 @@ subprojects { from(components["java"]) } } + + repositories { + maven { + name = "Vega" + url = uri("https://vega.botdiril.com/") + credentials { + val vegaUsername: String? by project + val vegaPassword: String? by project + + username = vegaUsername + password = vegaPassword + } + } + } + } + + configure { + val signingKey: String? by project + val signingPassword: String? by project + useInMemoryPgpKeys(signingKey, signingPassword) + sign(the().publications["maven"]) } } diff --git a/engine-core/plutoaudio/src/main/java/org/plutoengine/audio/al/AudioEngine.java b/engine-core/plutoaudio/src/main/java/org/plutoengine/audio/al/AudioEngine.java index 2eb8105..9ff94e6 100755 --- a/engine-core/plutoaudio/src/main/java/org/plutoengine/audio/al/AudioEngine.java +++ b/engine-core/plutoaudio/src/main/java/org/plutoengine/audio/al/AudioEngine.java @@ -3,15 +3,14 @@ package org.plutoengine.audio.al; import org.joml.Vector3f; import org.lwjgl.openal.*; import org.lwjgl.system.MemoryUtil; +import org.plutoengine.Pluto; +import org.plutoengine.logger.Logger; +import org.plutoengine.logger.SmartSeverity; import javax.annotation.concurrent.ThreadSafe; import java.nio.ByteBuffer; import java.nio.IntBuffer; -import org.plutoengine.Pluto; -import org.plutoengine.logger.Logger; -import org.plutoengine.logger.SmartSeverity; - /** * @author 493msi * diff --git a/engine-core/plutoruntime/src/main/java/org/plutoengine/resource/filesystem/EnumBackingFileSystem.java b/engine-core/plutoruntime/src/main/java/org/plutoengine/resource/filesystem/EnumBackingFileSystem.java index 7aefad9..504e237 100755 --- a/engine-core/plutoruntime/src/main/java/org/plutoengine/resource/filesystem/EnumBackingFileSystem.java +++ b/engine-core/plutoruntime/src/main/java/org/plutoengine/resource/filesystem/EnumBackingFileSystem.java @@ -20,10 +20,9 @@ import java.util.function.BiFunction; @JsonDeserialize(converter = EnumBackingFileSystem.Deserializer.class) public enum EnumBackingFileSystem { - FS_DIRECTORY("open", uri -> FileSystems.getDefault(), - (uri, fileSystem) -> fileSystem.getPath(uri.getPath()), + (uri, fileSystem) -> fileSystem.provider().getPath(uri), (fs, address, ext) -> { var sep = fs.getSeparator(); var rootOffs = address.getRootOffset();