Skip to content

Commit

Permalink
Bump project to run on a minimum of Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
ascopes committed Dec 26, 2024
1 parent 339ea44 commit 36ba45c
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 232 deletions.
72 changes: 0 additions & 72 deletions .github/workflows/build-ea.yml

This file was deleted.

39 changes: 30 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,58 @@ on:
pull_request_target:
branches:
- main
- v5
push:
branches:
- main
- v5
workflow_call: {}
workflow_dispatch: {}

jobs:
validate:
name: Validation steps
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
check_together: 'yes'
scandir: './scripts'

- name: Validate codecov.yml
shell: bash
run: curl -vvv --fail --data-binary @- https://codecov.io/validate < codecov.yml


build:
name: Build on JDK ${{ matrix.java-version }} (${{ matrix.os-name }})
runs-on: ${{ matrix.os-name }}

strategy:
fail-fast: false
matrix:
os-name: [ubuntu-latest]
os-name: [ubuntu-latest, macos-latest, windows-latest]
java-version:
- 11 # LTS
- 17 # LTS
- 21 # LTS
- 17
- 21
- GA # Latest GA JDK
- EA # Current Mainline

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Initialize JDK
uses: actions/setup-java@v4
uses: oracle-actions/setup-java@v1
with:
check-latest: true
distribution: zulu
java-version: ${{ matrix.java-version }}
website: jdk.java.net
release: ${{ matrix.java-version }}

- name: Maven cache
uses: actions/cache@v4
Expand All @@ -44,7 +65,7 @@ jobs:
path:
~/.m2
key: build-${{ env.cache-name }}

- name: Compile and run tests
shell: bash
run: ./mvnw -B -U clean verify
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ on:
pull_request:
branches:
- main
- v5
types:
- opened
- synchronize
push:
branches:
- main
- v5
workflow_call: {}
workflow_dispatch: {}

Expand All @@ -18,7 +20,7 @@ jobs:
runs-on: ubuntu-latest

concurrency:
group: codeql-codeql-${{ github.head_ref || github.run_id }}
group: codeql-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: zulu
# Must use >= JDK 17 for Javadocs to generate correctly
java-version: 23
server-id: ossrh
server-username: OSSRH_USERNAME
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- v5

jobs:
submit-dependency-snapshot:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/validate.yml

This file was deleted.

117 changes: 40 additions & 77 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,32 @@
# Contribution guidelines and info

Hi! Thanks for taking an interest in this project!
If you would like to contribute, then help is always
welcome however big or small!
Hi! Thanks for taking an interest in this project! If you would like to contribute, then help is
always welcome however big or small!

## Finding something to contribute

If you are new and would like to pick something up,
check the issues tab to see if anything is of interest.
If you want further clarification, feel free to drop a
comment.
If you are new and would like to pick something up, check the issues tab to see if anything is of
interest. If you want further clarification, feel free to drop a comment.

You could alternatively add a message on the discussions
tab!
You could alternatively add a message on the discussions tab!

Contributions do not necessarily need to be code changes
either. You can also contribute by:
Contributions do not necessarily need to be code changes either. You can also contribute by:

- Testing this project out for yourself and discussing any
feedback on the discussions page.
- Testing this project out for yourself and discussing any feedback on the discussions page.
- Fixing and improving documentation.
- Contributing new Wiki pages.
- Raising bugs in the issue tab.

## Raising issues

If raising an issue, please make sure that you include
some details such as:

- The problem in a short description.
- What do you expect to happen?
- What actually happens?
- How did you reproduce this (if applicable)?
- What JDK you are using
- What OS you are using

If these are not relevant to you, then they can be
ignored.

## Getting help

Please make a discussion in the discussions tab rather
than opening a new issue if you need help with using this library.
Please make a discussion in the discussions tab rather than opening a new issue if you need help
with using this library.

## Contributing changes to fix issues

If you are contributing to an issue, drop a message on
that issue so that I can assign it to you! **If you would be
able to keep me up to date with any progress on that issue,
that would be fantastic**, since it enables me to track
how much work is left to do and to be able to provide any
If you are contributing to an issue, drop a message on that issue so that I can assign it to you!
**If you would be able to keep me up to date with any progress on that issue, that would be
fantastic**, since it enables me to track how much work is left to do and to be able to provide any
help if needed.

Everyone is entitled to their own life, but if I haven't heard anything back for a while,
Expand All @@ -61,21 +38,16 @@ but never actually finished.

## Branching

When you are ready, make a fork of this repo. When you
work on your fork, make sure you create a new branch to
work off of rather than committing to your master/main
branch. This will make it easier for you to update your
copy with any new changes to this project, and avoid
filling pull requests with lots of messy merge commits
unnecessarily!
When you are ready, make a fork of this repo. When you work on your fork, make sure you create
a new branch to work off of rather than committing to your master/main branch. This will make it
easier for you to update your copy with any new changes to this project, and avoid filling pull
requests with lots of messy merge commits unnecessarily!

## Building this project

This project uses Apache Maven as the build system, and
requires JDK 11 or newer.
This project uses Apache Maven as the build system, and requires JDK 17 or newer.

To build this project and run the tests, you can run the
following in your terminal:
To build this project and run the tests, you can run the following in your terminal:

```bash
# Linux, Mac OS, Git Bash users
Expand All @@ -85,55 +57,46 @@ following in your terminal:
.\mvnw.cmd clean package verify
```

If you use Windows, you should download the JDK from
somewhere such as https://adoptium.net/en-GB/temurin/.
If you use Windows, you should download the JDK from somewhere such as
https://adoptium.net/en-GB/temurin/.

On Linux and MacOS, I tend to use a tool called
[SDKMan](https://sdkman.io/) to download and install
Java tooling. I personally use Amazon Corretto 17, but
you can use any JDK implementation you like, such as
Temurin, Graal, Liberica, SAP, etc. All should work
On Linux and macOS, I tend to use a tool called [SDKMan](https://sdkman.io/)
to download and install Java tooling. I personally use Amazon Corretto, but you can use any JDK
implementation you like, such as Temurin, Graal, Liberica, SAP, etc. All should work
the same for the most part.

## Licensing

All changes that you make will be applied under the
Apache license, as documented in this repository.
You can find out more about what this means at
[TLDRLegal](https://tldrlegal.com/license/apache-license-2.0-(apache-2.0))!
All changes that you make will be applied under the Apache license, as documented in this
repository. You can find out more about what this means at [TLDRLegal](https://tldrlegal.com/license/apache-license-2.0-(apache-2.0))!

Each file that you create must have a special header
comment at the top that mentions this license. If you
need to add this header to your files, you can run
`./mvnw license:format` to do it for you automatically!
Each file that you create must have a special header comment at the top that mentions this license.
If you need to add this header to your files, you can run `./mvnw license:format` to do it for you
automatically.

## Code style

This project uses a modified version of the Google
Code Style guide for Java. The main things to remember
are:
This project uses a modified version of the Google Code Style guide for Java. The main things to
remember are:

- 2-space indentation rather than tabs
- Public classes and methods need a JavaDoc
- Line length is limited to 100 lines

Good things to remember:

- Keep lines of code simple. It is fine to use multiple
lines of code to declare something if it makes it easier
to read.
- Keep lines of code simple. It is fine to use multiple lines of code to declare something if it
- makes it easier to read.
- Keep naming clear and simple!

A tool called CheckStyle will attempt to enforce these rules
for you. You can run `./mvnw checkstyle:check` to verify
your code matches these rules.
A tool called CheckStyle will attempt to enforce these rules for you. You can run
`./mvnw checkstyle:check` to verify your code matches these rules.

## Commits

Please try to keep commits atomic and clear. Each commit
should ideally leave the project in a working state. Each
commit should also have a clear title and explaination as
to what the commit changes, and why.
Please try to keep commits atomic and clear. Each commit should ideally leave the project in a
working state. Each commit should also have a clear title and explanation as to what the commit
changes, and why.

## Deployment process

Expand All @@ -147,6 +110,6 @@ Changelogs are automatically generated from the pull request history between the
`main` branch and the last tag that was added. This is why it is important to have descriptive
pull requests where appropriate.

Upon successfully deploying to Maven Central, a release will be added to the
[releases](../../releases) page on the repository. A changelog will automatically get
attached and any contributors will be `@mentioned` in those changelogs.
Upon successfully deploying to Maven Central, a release will be added to the [releases](../../releases)
page on the repository. A changelog will automatically get attached and any contributors will be
`@mentioned` in those changelogs.
Loading

0 comments on commit 36ba45c

Please sign in to comment.