diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index b8d797d..5b1de3b 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -1,6 +1,6 @@ name: bld-ci -on: [ push, pull_request, workflow_dispatch ] +on: [push, pull_request, workflow_dispatch] jobs: build-bld-project: @@ -8,25 +8,29 @@ jobs: strategy: matrix: - java-version: [ 17, 21, 22 ] + java-version: [17, 21, 22] steps: - name: Checkout source repository - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up JDK ${{ matrix.java-version }} - uses: actions/setup-java@v4 + uses: actions/setup-java@v3 with: distribution: "zulu" java-version: ${{ matrix.java-version }} - - name: Download dependencies + - name: Grant execute permission for bld + run: chmod +x bld + + - name: Download the dependencies run: ./bld download - - name: Run tests + - name: Run tests with bld run: >- ./bld compile test -DtestsBadgeUrl=https://rife2.com/tests-badge/update/com.uwyn.rife2/rife2-renderers -DtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }} + diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index bf43624..0236ccd 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -3,7 +3,7 @@ name: javadocs-pages on: # Runs on pushes targeting the default branch push: - branches: ["master"] + branches: [ "master" ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -30,14 +30,14 @@ jobs: steps: - name: Checkout source repository - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up JDK 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v3 with: - distribution: "zulu" + distribution: 'zulu' java-version: 17 - name: Build Javadocs @@ -50,8 +50,8 @@ jobs: uses: actions/upload-pages-artifact@v1 with: # Upload generated Javadocs repository - path: "build/javadoc/" + path: 'build/javadoc/' - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v1 \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1a64ef3..b8dbc52 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,7 +3,7 @@ name: Publish to the Maven Central/Rife2 on: workflow_dispatch: release: - types: [released] + types: [ released ] jobs: build-bld-project: @@ -11,23 +11,26 @@ jobs: steps: - name: Checkout source repository - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up JDK - uses: actions/setup-java@v4 + uses: actions/setup-java@v3 with: - distribution: "temurin" + distribution: 'temurin' java-version: 17 - - name: Download dependencies + - name: Grant execute permission for bld + run: chmod +x bld + + - name: Download the dependencies run: ./bld download - name: Import key run: echo "${{ secrets.SIGN_SECRET_KEY }}" | gpg --batch --import - - - name: Publish + + - name: Publish with bld run: >- ./bld compile test publish -DtestsBadgeUrl=https://rife2.com/tests-badge/update/com.uwyn.rife2/rife2-renderers @@ -38,6 +41,6 @@ jobs: -DsonatypePassword=${{ secrets.SONATYPE_PASSWORD }} -DsignKey=${{ secrets.SIGN_KEY }} -DsignPassphrase=${{ secrets.SIGN_PASSPHRASE }} - + - name: Delete GnuPG data run: rm -rfv $HOME/.gnupg diff --git a/.idea/bld.xml b/.idea/bld.xml deleted file mode 100644 index 6600cee..0000000 --- a/.idea/bld.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml index 4dd96bf..0b615c1 100644 --- a/.idea/libraries/bld.xml +++ b/.idea/libraries/bld.xml @@ -2,12 +2,12 @@ - + - + diff --git a/.vscode/settings.json b/.vscode/settings.json index 5b2667b..9e8368e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,7 +9,7 @@ ], "java.configuration.updateBuildConfiguration": "automatic", "java.project.referencedLibraries": [ - "${HOME}/.bld/dist/bld-2.0.1.jar", + "${HOME}/.bld/dist/bld-1.9.0.jar", "lib/**/*.jar" ] } diff --git a/README.md b/README.md index 86f3cfd..54d287d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Java](https://img.shields.io/badge/java-17%2B-blue)](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) -[![bld](https://img.shields.io/badge/2.0.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) +[![bld](https://img.shields.io/badge/1.9.0-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/rife2/rife2-template-renderers)](https://github.com/rife2/rife2-template-renderers/releases/latest) [![Release](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/releases/com/uwyn/rife2/rife2-renderers/maven-metadata.xml?color=blue)](https://repo.rife2.com/#/releases/com/uwyn/rife2/rife2-renderers) [![Maven Central](https://img.shields.io/maven-central/v/com.uwyn.rife2/rife2-renderers)](https://central.sonatype.com/artifact/com.uwyn.rife2/rife2-renderers/) diff --git a/config/pmd.xml b/config/pmd.xml index 3d3203c..cf0b4d4 100644 --- a/config/pmd.xml +++ b/config/pmd.xml @@ -19,13 +19,19 @@ + + + + + + - + @@ -35,9 +41,8 @@ - - + @@ -53,6 +58,8 @@ + + @@ -106,4 +113,4 @@ - + \ No newline at end of file diff --git a/lib/bld/bld-wrapper.jar b/lib/bld/bld-wrapper.jar index e173105..5e81e4b 100644 Binary files a/lib/bld/bld-wrapper.jar and b/lib/bld/bld-wrapper.jar differ diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index 612b34a..d3d50c0 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -1,8 +1,8 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true -bld.downloadLocation= -bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.7 -bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.4 +bld.extension-pmd=com.uwyn.rife2:bld-pmd:0.9.7 +bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.3 bld.extension-tests=com.uwyn.rife2:bld-tests-badge:1.4.6 bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES -bld.version=2.0.1 +bld.downloadLocation= +bld.version=1.9.0 diff --git a/src/bld/java/rife/render/TemplateRenderersBuild.java b/src/bld/java/rife/render/TemplateRenderersBuild.java index d8d70b5..d8b05d1 100644 --- a/src/bld/java/rife/render/TemplateRenderersBuild.java +++ b/src/bld/java/rife/render/TemplateRenderersBuild.java @@ -27,6 +27,7 @@ import rife.bld.publish.PublishInfo; import rife.bld.publish.PublishLicense; import rife.bld.publish.PublishScm; +import java.io.IOException; import java.util.List; import static rife.bld.dependencies.Repository.*; @@ -40,7 +41,7 @@ public class TemplateRenderersBuild extends Project { public TemplateRenderersBuild() { pkg = "rife.render"; name = "rife2-template-renderers"; - version = version(1, 1, 6, "SNAPSHOT"); + version = version(1, 1, 5); javaRelease = 17; downloadSources = true; @@ -48,11 +49,11 @@ public class TemplateRenderersBuild extends Project { repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES); scope(compile) - .include(dependency("com.uwyn.rife2", "rife2", version(1, 8, 0))); + .include(dependency("com.uwyn.rife2", "rife2", version(1, 7, 3))); scope(test) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 3))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 3))) - .include(dependency("org.assertj", "assertj-core", version(3, 26, 3))); + .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 2))) + .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 2))) + .include(dependency("org.assertj", "assertj-core", version(3, 25, 3))); javadocOperation().javadocOptions() .docTitle("RIFE2 Template Renderers") @@ -61,13 +62,13 @@ public class TemplateRenderersBuild extends Project { .link("https://rife2.github.io/rife2/"); publishOperation() - .repository(version.isSnapshot() ? SONATYPE_SNAPSHOTS + .repository(version.isSnapshot() ? repository(SONATYPE_SNAPSHOTS.location()) .withCredentials(property("sonatypeUser"), property("sonatypePassword")) - : SONATYPE_RELEASES + : repository(SONATYPE_RELEASES.location()) .withCredentials(property("sonatypeUser"), property("sonatypePassword"))) - .repository(version.isSnapshot() ? RIFE2_SNAPSHOTS + .repository(version.isSnapshot() ? repository(RIFE2_SNAPSHOTS.location()) .withCredentials(property("rife2Username"), property("rife2Password")) - : RIFE2_RELEASES + : repository(RIFE2_RELEASES.location()) .withCredentials(property("rife2Username"), property("rife2Password"))) .info(new PublishInfo() .groupId("com.uwyn.rife2") @@ -80,7 +81,7 @@ public class TemplateRenderersBuild extends Project { .developer(new PublishDeveloper().id("gbevin").name("Geert Bevin").email("gbevin@uwyn.com") .url("https://github.com/gbevin")) .license(new PublishLicense().name("The Apache License, Version 2.0") - .url("https://www.apache.org/licenses/LICENSE-2.0.txt")) + .url("http://www.apache.org/licenses/LICENSE-2.0.txt")) .scm(new PublishScm().connection("scm:git:https://github.com/rife2/rife2-template-renderers.git") .developerConnection("scm:git:git@github.com:rife2/rife2-template-renderers.git") .url("https://github.com/rife2/rife2-template-renderers")) @@ -93,14 +94,14 @@ public class TemplateRenderersBuild extends Project { } @BuildCommand(summary = "Generates JaCoCo Reports") - public void jacoco() throws Exception { + public void jacoco() throws IOException { new JacocoReportOperation() .fromProject(this) .execute(); } @BuildCommand(summary = "Runs PMD analysis") - public void pmd() throws Exception { + public void pmd() { new PmdOperation() .fromProject(this) .failOnViolation(true) @@ -114,4 +115,4 @@ public class TemplateRenderersBuild extends Project { .apiKey(property("testsBadgeApiKey")) .fromProject(this)); } -} +} \ No newline at end of file