From 8184086fc823d04125308866d8092e200f886a34 Mon Sep 17 00:00:00 2001 From: Alex <42661490+ThatRedox@users.noreply.github.com> Date: Mon, 31 Oct 2022 09:48:39 -0700 Subject: [PATCH] Update build to Java17. Add GH actions build script. (#31) * Update gradle build to Java 17 * Add gh actions build. Fix line endings. --- .github/workflows/plugin_build.yml | 34 ++++++++++++++++++++++++ README.md | 13 ++++++++- build.gradle | 11 ++++++-- gradle/wrapper/gradle-wrapper.properties | 2 +- 4 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/plugin_build.yml diff --git a/.github/workflows/plugin_build.yml b/.github/workflows/plugin_build.yml new file mode 100644 index 0000000..9e553ad --- /dev/null +++ b/.github/workflows/plugin_build.yml @@ -0,0 +1,34 @@ +name: Plugin Build + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '17' + java-package: jdk + + - name: Grant executable permission for gradlew + run: chmod +x gradlew + + - name: Build with Gradle + run: ./gradlew pluginJar + + - name: Upload the plugin Jar + uses: actions/upload-artifact@v3 + with: + name: ChunkyDenoiser + path: build/libs/*.jar + if-no-files-found: error diff --git a/README.md b/README.md index e0ca286..d40593b 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,18 @@ These files can be used by [Intel Open Image Denoise][openimagedenoise-dl] like ./denoise -ldr scene-name.pfm -alb scene-name.albedo.pfm -nrm scene-name.normal.pfm -o output.pfm ``` -## License +# Development + +It is recommended to use [IntelliJ](https://www.jetbrains.com/idea/). Install the Java17 JDK ([Temurin](https://adoptium.net/) is the recommended distribution). +Then, [clone](https://www.jetbrains.com/help/idea/set-up-a-git-repository.html#clone-repo) the Chunky repository and let IntelliJ index the project. +Navigate to `src/main/java/de/lemaik/chunky/denoiser/DenoiserPlugin` and click the green play button next to `public class DenoiserPlugin implements Plugin {` to build and run the denoiser plugin. + +To build the plugin externally, run the `gradlew` script in the project root directory. Gradle is setup with a few main tasks: + +* `gradlew pluginJar` - Build the denoiser plugin Jar +* `gradlew clean` - Cleans the project. Removes old builds. + +# License Copyright 2019-2021 Maik Marschner (leMaik) diff --git a/build.gradle b/build.gradle index c808c66..378004f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,6 @@ -apply plugin: 'java' +plugins { + id 'org.openjfx.javafxplugin' version '0.0.10' +} jar.enabled = false sourceCompatibility = '1.8' @@ -30,6 +32,12 @@ jar { } } +javafx { + version = '17' + modules = ['javafx.base', 'javafx.controls', 'javafx.fxml'] + configuration = 'provided' +} + repositories { mavenLocal() mavenCentral() @@ -37,4 +45,3 @@ repositories { url 'https://repo.lemaik.de/' } } - diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 290541c..ffed3a2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists