diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..0874e8f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,34 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] + +# Sane defaults +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +# Java files +[*.java] +tab_width = 4 +indent_size = 4 +indent_style = space + +# XML files +[*.{xml,fxml}] +tab_width = 4 +indent_size = 4 +indent_style = space + +[*.css] +tab_width = 4 +indent_size = 4 +indent_style = space + +# MD Files +[*.md] +ij_formatter_enabled = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0c42f3c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=crlf diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a46ab9d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,100 @@ +name: Build and Deploy + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + release: + types: [ "published" ] + +permissions: + contents: write + packages: write + +# cancel in progress jobs or runs for the current workflow +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} + +jobs: + + build-jar: + + name: jar / ${{ matrix.os }} / ${{ matrix.jdk-version }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + jdk-version: [ 17 ] + os: [ ubuntu-latest, macos-latest, windows-latest ] + + steps: + + - uses: actions/checkout@v3 + + - name: Set Up JDK ${{ matrix.jdk-version }} + uses: actions/setup-java@v3 + with: + java-version: ${{ matrix.jdk-version }} + distribution: 'temurin' + + - name: Set Up Maven + uses: stCarolas/setup-maven@v4.5 + with: + maven-version: 3.8.8 + + - name: Cache Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Import GPG Key + uses: crazy-max/ghaction-import-gpg@v5 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + + - name: Setup Maven Revision + shell: bash + run: echo "project_revision=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + + - name: Update Maven Revision As Snapshot + if: github.event_name != 'release' + shell: bash + run: echo "project_revision=${{ env.project_revision }}-${GITHUB_SHA::6}-SNAPSHOT" >> $GITHUB_ENV + + - name: Maven Build and Verify Jar + run: mvn -V -B -e -ff -ntp -P github,release-sign-artifacts -Drevision="${{ env.project_revision }}" clean verify + + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + if: runner.os == 'Linux' + continue-on-error: true + with: + name: LitFX-${{ env.project_revision }} + path: | + ./**/target/*.pom + ./**/target/*.jar + ./**/target/*.asc + retention-days: 10 + if-no-files-found: error + + - name: Deploy Github Package + if: runner.os == 'Linux' && (github.ref == 'refs/heads/master' || github.event_name == 'release') + continue-on-error: true + # LitFX is an invalid artifactId per GH Packages, using -fn to allow others to upload + run: mvn -V -B -e -fn -ntp -P github,release-sign-artifacts -Drevision="${{ env.project_revision }}" deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Deploy OSSRH Package + if: runner.os == 'Linux' && (github.ref == 'refs/heads/master' || github.event_name == 'release') + run: mvn -V -B -e -ff -ntp -P ossrh,release-sign-artifacts -Drevision=${{ env.project_revision }} deploy + env: + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} diff --git a/_config.yml b/_config.yml index 1885487..bad8266 100644 --- a/_config.yml +++ b/_config.yml @@ -1 +1 @@ -theme: jekyll-theme-midnight \ No newline at end of file +theme: jekyll-theme-midnight diff --git a/litfx-controls/pom.xml b/litfx-controls/pom.xml index 62bb14a..eb1bfe7 100644 --- a/litfx-controls/pom.xml +++ b/litfx-controls/pom.xml @@ -1,34 +1,34 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 LitFX com.github.birdasaur.litfx - 0.1.1 + ${revision} litfx-controls jar - 14 - 14 - 14 + ${java.version} + ${java.version} + ${java.version} com.github.birdasaur.litfx litfx-core - 0.1.1 + ${project.version} org.openjfx javafx-fxml - ${jfx.version} - ${jfx.dependency.scope} + ${javafx.version} + ${javafx.dependency.scope} diff --git a/litfx-controls/src/main/java/module-info.java b/litfx-controls/src/main/java/module-info.java index 4654fd8..5bf2340 100644 --- a/litfx-controls/src/main/java/module-info.java +++ b/litfx-controls/src/main/java/module-info.java @@ -2,10 +2,10 @@ * @author Birdasaur */ module lit.litfx.controls { - requires lit.litfx.core; + requires transitive lit.litfx.core; requires javafx.controls; exports lit.litfx.controls.menus; exports lit.litfx.controls.output; exports lit.litfx.controls.covalent; exports lit.litfx.controls.covalent.events; -} \ No newline at end of file +} diff --git a/litfx-core/pom.xml b/litfx-core/pom.xml index 9c8aa74..a536ad8 100644 --- a/litfx-core/pom.xml +++ b/litfx-core/pom.xml @@ -1,29 +1,29 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 LitFX com.github.birdasaur.litfx - 0.1.1 + ${revision} litfx-core jar - 14 - 14 - 14 + ${java.version} + ${java.version} + ${java.version} org.openjfx javafx-controls - ${jfx.version} - ${jfx.dependency.scope} + ${javafx.version} + ${javafx.dependency.scope} diff --git a/litfx-core/src/main/java/module-info.java b/litfx-core/src/main/java/module-info.java index da50f0d..6029e30 100644 --- a/litfx-core/src/main/java/module-info.java +++ b/litfx-core/src/main/java/module-info.java @@ -8,4 +8,4 @@ exports lit.litfx.core.components.fire; exports lit.litfx.core.components.targeting; exports lit.litfx.core.utils; -} \ No newline at end of file +} diff --git a/litfx-demos/nbactions.xml b/litfx-demos/nbactions.xml index 2ff7490..5acdab7 100644 --- a/litfx-demos/nbactions.xml +++ b/litfx-demos/nbactions.xml @@ -21,9 +21,44 @@ true - java true - -agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} --module-path ${project.build.directory}/modules --module ${moduleName}/${mainClass} - + - + + run.single.main + + * + + + clean + javafx:run + + + true + ${packageClassName} + + + + debug.single.main + + * + + + clean + javafx:run@debug + + + true + true + ${packageClassName} + + + + CUSTOM-JLink + JLink + + clean + javafx:jlink + + + diff --git a/litfx-demos/pom.xml b/litfx-demos/pom.xml index ab00ad4..e50ee45 100644 --- a/litfx-demos/pom.xml +++ b/litfx-demos/pom.xml @@ -1,41 +1,36 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 LitFX com.github.birdasaur.litfx - 0.1.1 + ${revision} litfx-demos jar - 14 - 14 - 14 + ${java.version} + ${java.version} + ${java.version} lit.litfx.demos lit.litfx.demos.TargetingDemo - - com.github.birdasaur.litfx - litfx-core - 0.1.1 - com.github.birdasaur.litfx litfx-controls - 0.1.1 + ${project.version} org.openjfx javafx-fxml - ${jfx.version} - ${jfx.dependency.scope} + ${javafx.version} + ${javafx.dependency.scope} @@ -44,6 +39,7 @@ org.apache.maven.plugins maven-jar-plugin + ${maven.jar.plugin.version} @@ -56,17 +52,16 @@ org.openjfx javafx-maven-plugin - ${jfx.plugin.version} + ${javafx.plugin.version} ${moduleName}/${mainClassName} true - - - - - - - + true + 2 + true + true + litfx + image @@ -81,8 +76,8 @@ true lines,vars,source - - + + ${moduleName}/${mainClassName} true diff --git a/litfx-demos/src/main/java/module-info.java b/litfx-demos/src/main/java/module-info.java index ff550cc..dddd621 100644 --- a/litfx-demos/src/main/java/module-info.java +++ b/litfx-demos/src/main/java/module-info.java @@ -5,10 +5,9 @@ */ module lit.litfx.demos { requires javafx.controls; - requires javafx.fxml; - requires lit.litfx.core; - requires lit.litfx.controls; + requires javafx.fxml; + requires transitive lit.litfx.controls; opens lit.litfx.demos to javafx.fxml; opens lit.litfx.demos.controllers to javafx.fxml; exports lit.litfx.demos to javafx.graphics; -} \ No newline at end of file +} diff --git a/nb-configuration.xml b/nb-configuration.xml deleted file mode 100644 index 87d13f4..0000000 --- a/nb-configuration.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/nbactions-release-sign-artifacts.xml b/nbactions-release-sign-artifacts.xml deleted file mode 100644 index 7164f55..0000000 --- a/nbactions-release-sign-artifacts.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - CUSTOM-RELEASE-SIGN-DEPLOY - RELEASE-SIGN-DEPLOY - - clean - deploy - - - - - diff --git a/nbactions.xml b/nbactions.xml index 050c5f1..f83b937 100644 --- a/nbactions.xml +++ b/nbactions.xml @@ -1,31 +1,27 @@ - run - - jar - + CUSTOM-Deploy-OSSRH + Deploy to OSSRH clean - javafx:run + deploy + + ossrh + release-sign-artifacts + - debug - - jar - + CUSTOM-Deploy-Github + Deploy to Github clean - clean javafx:run@debug + deploy + + github + release-sign-artifacts + - - CUSTOM-JLink - JLink - - clean - javafx:jlink - - - + diff --git a/pom.xml b/pom.xml index e6e87d8..1630b31 100644 --- a/pom.xml +++ b/pom.xml @@ -1,11 +1,11 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.github.birdasaur.litfx LitFX - 0.1.1 + ${revision} pom @@ -15,22 +15,40 @@ + + 0.1.1 UTF-8 - 14 - 14 - 14 - 14 - 0.0.6 - - compile - 5.7.1 + UTF-8 + 17 + 3.6.3 + ${java.version} + ${java.version} + ${java.version} + + 3.3.0 + 3.11.0 + 3.1.1 + 3.3.0 + 3.3.0 + 3.5.0 + 3.1.0 + 1.5.0 + 2.0.1 + 1.6.13 + 20.0.2 + 0.0.8 + + + + runtime + 5.9.3 scm:git:git://github.com/Birdasaur/LitFX.git scm:git:git@github.com:Birdasaur/LitFX.git https://github.com/Birdasaur/LitFX - LitFX-0.1.1 + LitFX-${revision} @@ -42,29 +60,18 @@ org.junit.jupiter - junit-jupiter-engine + junit-jupiter-params ${junit.jupiter.version} test org.junit.jupiter - junit-jupiter-params + junit-jupiter-engine ${junit.jupiter.version} test - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2 - - - @@ -72,36 +79,17 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + ${maven.jar.plugin.version} org.apache.maven.plugins maven-compiler-plugin - 3.8.1 - - - org.apache.maven.plugins - maven-release-plugin - 3.0.0-M4 - - true - true - false - forked-path - -Dgpg.passphrase=${gpg.passphrase} - - - - org.apache.maven.scm - maven-scm-provider-gitexe - 1.11.2 - - + ${maven.compiler.plugin.version} org.apache.maven.plugins maven-deploy-plugin - 3.0.0-M1 + ${maven.deploy.plugin.version} default-deploy @@ -119,7 +107,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M3 + ${maven.enforcer.plugin.version} enforce-maven @@ -129,7 +117,7 @@ - 3.5.4 + [${maven.min.version},) @@ -137,21 +125,62 @@ - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true + + org.codehaus.mojo + flatten-maven-plugin + ${codehaus.flatten.plugin.version} - ossrh - https://oss.sonatype.org/ - true + resolveCiFriendliesOnly + + true + ${project.build.directory} + false + + flatten + flatten + flatten + + + + flatten + process-resources + + flatten + + + + flatten.clean + clean + + clean + + + + + + + + default + + true + + + compile + + + + release-sign-artifacts @@ -161,14 +190,15 @@ - provided + + provided org.apache.maven.plugins maven-source-plugin - 3.2.1 + ${maven.source.plugin.version} attach-sources @@ -181,7 +211,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + ${maven.javadoc.plugin.version} ${project.build.sourceEncoding} @@ -197,7 +227,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + ${maven.gpg.plugin.version} sign-artifacts @@ -211,6 +241,54 @@ + + ossrh + + + performRelease + true + + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2 + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + ${nexus.staging.maven.plugin.version} + true + + ossrh + https://oss.sonatype.org/ + true + + + + + + + + github + + false + + + + github + https://maven.pkg.github.com/Birdasaur/LitFX + + + diff --git a/release.properties b/release.properties deleted file mode 100644 index 4b34d00..0000000 --- a/release.properties +++ /dev/null @@ -1,11 +0,0 @@ -#release configuration -#Tue Sep 15 20:21:49 EDT 2020 -projectVersionPolicyId=default -scm.tagNameFormat=@{project.artifactId}-@{project.version} -remoteTagging=true -scm.commentPrefix=[maven-release-plugin] -pushChanges=false -completedPhase=check-poms -scm.url=scm\:git\:git@github.com\:Birdasaur/LitFX.git -exec.snapshotReleasePluginAllowed=false -preparationGoals=clean verify