Skip to content

Commit

Permalink
Update to the latest build conventions
Browse files Browse the repository at this point in the history
- add windows build
- remove deprecated `capitalize` use.
- update spotbugs suppressions
  • Loading branch information
big-andy-coates committed Nov 21, 2023
1 parent 26cd7a9 commit 262c866
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ permissions:
contents: read

jobs:
build:
build_linux:
permissions:
packages: write
runs-on: ubuntu-latest
Expand Down Expand Up @@ -75,9 +75,27 @@ jobs:
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
run: |
./gradlew -Dgradle.publish.key="$GRADLE_PUBLISH_KEY" -Dgradle.publish.secret="$GRADLE_PUBLISH_SECRET" publishPlugins
build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # v1.1.0
- name: Set up JDK
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0
with:
gradle-home-cache-cleanup: true
- name: Build
run: ./gradlew.bat build

create-gh-release:
if: startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref, '-alpha')
needs: build
needs: [build_linux, build_windows]
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ publishing {
name.set("${project.group}:${artifactId}")

if (prependRootName) {
description.set("${rootProject.name.capitalize()} ${project.name} library".replace("-", " "))
description.set("${rootProject.name} ${project.name} library".replace("-", " "))
} else {
description.set("${project.name.capitalize()} library".replace("-", " "))
description.set("${project.name} library".replace("-", " "))
}

url.set("https://www.creekservice.org")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ publishing {
name.set("${project.group}:${artifactId}")

if (prependRootName) {
description.set("${rootProject.name.capitalize()} ${project.name} library".replace("-", " "))
description.set("${rootProject.name} ${project.name} library".replace("-", " "))
} else {
description.set("${project.name.capitalize()} library".replace("-", " "))
description.set("${project.name} library".replace("-", " "))
}

url.set("https://www.creekservice.org")
Expand Down
6 changes: 6 additions & 0 deletions config/spotbugs/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@
<!-- Exclude generated sources -->
<Source name="~.*[\\/]build[\\/]generated[\\/]source.*" />
</Match>

<Match>
<!-- Disable this check as it leads to longer names and harder to read code -->
<!-- Discussion: https://github.com/spotbugs/spotbugs/issues/2627 -->
<Bug pattern="PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_CLASS_NAMES"/>
</Match>
</FindBugsFilter>

0 comments on commit 262c866

Please sign in to comment.