Skip to content

Commit e122a7a

Browse files
author
Frank Delporte
committed
Bump this project to Java 25 and Pi4J 4 so it can be used on Raspberry Pi 5
1 parent 8e66ecb commit e122a7a

45 files changed

Lines changed: 169 additions & 176 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-reusable.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/setup-java@v4
1818
with:
1919
distribution: temurin
20-
java-version: 21
20+
java-version: 25
2121
- name: Change wrapper permissions
2222
run: chmod +x pi4micronaut-utils/gradlew
2323
- name: Setup Gradle
@@ -52,7 +52,7 @@ jobs:
5252
- name: Set up Java
5353
uses: actions/setup-java@v4
5454
with:
55-
java-version: '21'
55+
java-version: '25'
5656
distribution: 'temurin'
5757
- name: Change wrapper permissions
5858
run: chmod +x pi4micronaut-utils/gradlew
@@ -89,10 +89,10 @@ jobs:
8989
- uses: actions/checkout@v4
9090
with:
9191
fetch-depth: 0
92-
- name: Set up JDK 21
92+
- name: Set up JDK 25
9393
uses: actions/setup-java@v4
9494
with:
95-
java-version: '21'
95+
java-version: '25'
9696
distribution: 'temurin'
9797
- name: Change wrapper permissions
9898
run: chmod +x pi4micronaut-utils/gradlew

.github/workflows/github-actions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
os: [ubuntu-latest, windows-latest, macos-latest]
2121
steps:
2222
- uses: actions/checkout@v3
23-
- name: Set up JDK 21
23+
- name: Set up JDK 25
2424
uses: actions/setup-java@v4
2525
with:
26-
java-version: '21'
26+
java-version: '25'
2727
distribution: 'temurin'
2828
- name: Change wrapper permissions
2929
run: chmod +x pi4micronaut-utils/gradlew

.github/workflows/javadoc-gh-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v4
16-
- name: Set up JDK 21
16+
- name: Set up JDK 25
1717
uses: actions/setup-java@v4
1818
with:
19-
java-version: '21'
19+
java-version: '25'
2020
distribution: 'temurin'
2121
- name: Change wrapper permissions
2222
run: chmod +x pi4micronaut-utils/gradlew

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
![GitHub License](https://img.shields.io/github/license/oss-slu/Pi4Micronaut)
66
[![Documentation](https://img.shields.io/badge/Documentation-8D021F)](https://oss-slu.github.io/Pi4Micronaut/)
77

8-
98
[![Chat on Slack](https://img.shields.io/badge/Chat_on-Slack-4A154B?logo=slack)](https://join.slack.com/t/oswslu/shared_invite/zt-24f0qhjbo-NkSfQ4LOg5wXxBdxP4vzfA)
109
[![Donate to OSS](https://img.shields.io/badge/Donate_to-OSS-003AA6)](https://oss-slu.github.io/connect_with/donate)
1110
[![Unity Foundation](https://img.shields.io/badge/Unity_Foundation-unityfoundation.io-blue)](https://unityfoundation.io)
@@ -16,7 +15,7 @@ Pi4Micronaut is an innovative Java library crafted for developers who aim to bui
1615

1716
The existence of Pi4Micronaut is justified by the need for a robust, scalable, and efficient way to bridge the gap between enterprise-grade software and the physical world of hardware. It is particularly valuable for projects that demand both the high-performance, microservices-oriented capabilities of the Micronaut framework and the versatile hardware interaction that the Raspberry Pi offers. Whether it's for home automation, industrial monitoring, or educational purposes, Pi4Micronaut empowers developers to deliver reliable and sophisticated IoT applications that can run headless on a Raspberry Pi or be managed remotely, providing convenience, control, and customization to the end-users.
1817

19-
**Note:** Pi4Micronaut doesn't work with the latest Raspberry Pi 5 because of its whole new architecture. The Pi4J and pigpio libraries doesn't provide support for Pi 5 yet. Look out for the latest version of Pi4J to work with Pi 5 in the future.
18+
**Note:** Pi4Micronaut also works with the latest Raspberry Pi 5, although it has a new GPIO architecture. The Pi4J library V4+ is based on Java 25 and uses the Foreign Function and Memory API to handle the GPIOs, which makes it independent of the Raspberry Pi system and can even be used on other single-board computers.
2019

2120
### Information
2221

@@ -51,7 +50,6 @@ The existence of Pi4Micronaut is justified by the need for a robust, scalable, a
5150
- **Type:** IoT (Raspberry Pi)
5251
- **License:** [Apache License 2.0](https://opensource.org/license/apache-2-0/)
5352

54-
5553
## Pi4Micronaut
5654
- [Link to Pi4Micronaut Documentation](https://oss-slu.github.io/Pi4Micronaut/)
5755
- [API Reference](https://oss-slu.github.io/Pi4Micronaut/javadoc/index.html)
@@ -71,7 +69,7 @@ The existence of Pi4Micronaut is justified by the need for a robust, scalable, a
7169
- [Micronaut Guides](https://docs.micronaut.io/latest/guide/index.html)
7270
- [Micronaut HTTP Client documentation](https://docs.micronaut.io/latest/guide/index.html#httpClient)
7371

74-
## Pi4J 2.4.0
72+
## Pi4J 4.0.2
7573
- [Pi4j Documentation](https://pi4j.com/documentation/)
7674

7775
## Shadow Gradle 7.1.2

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
2-
id 'io.micronaut.application' version '4.4.4' apply false
3-
id 'io.micronaut.aot' version '4.4.4' apply false
4-
id 'com.github.johnrengelman.shadow' version '7.1.2' apply false
2+
id 'io.micronaut.application' version '5.0.2' apply false
3+
id 'io.micronaut.aot' version '5.0.2' apply false
4+
id 'com.gradleup.shadow' version '9.6.1' apply false
55
id("com.netflix.nebula.release") version "20.2.0"
66
}
77

components/build.gradle

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
2-
id("com.github.johnrengelman.shadow") version "7.1.2"
2+
id("com.gradleup.shadow") version "9.6.1"
33
// id("io.micronaut.application") version "3.7.3"
4-
id("io.micronaut.application") version "4.4.4"
5-
id("io.micronaut.aot") version "4.4.4"
4+
id("io.micronaut.application") version "5.0.2"
5+
id("io.micronaut.aot") version "5.0.2"
66
}
77

88
version = "0.1"
@@ -30,8 +30,15 @@ application {
3030
mainClass.set("com.opensourcewithslu.components.Application")
3131
}
3232
java {
33-
sourceCompatibility = JavaVersion.toVersion("21")
34-
targetCompatibility = JavaVersion.toVersion("21")
33+
sourceCompatibility = JavaVersion.toVersion("25")
34+
targetCompatibility = JavaVersion.toVersion("25")
35+
}
36+
37+
tasks.named('test') {
38+
useJUnitPlatform()
39+
// The only test (ComponentsTest) boots an embedded app that needs Pi hardware, so it is disabled.
40+
// Gradle 9 fails a test task that discovers no tests unless this is turned off.
41+
failOnNoDiscoveredTests = false
3542
}
3643

3744
micronaut {

0 commit comments

Comments
 (0)