Skip to content

Commit f73dd58

Browse files
authored
Merge pull request #73 from CodeDead/release/v1.1.0
Release/v1.1.0
2 parents 2100d61 + 31d0001 commit f73dd58

Some content is hidden

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

53 files changed

+1418
-913
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>com.codedead.opal</id>
4+
<metadata_license>FSFAP</metadata_license>
5+
<project_license>GPL-3.0-only</project_license>
6+
<name>Opal</name>
7+
<summary>Play relaxing music in the background</summary>
8+
9+
<description>
10+
<p>
11+
Opal is a free and open-source JavaFX application that can play relaxing music in the background.
12+
</p>
13+
<p>
14+
Select the sounds (20+ relaxing tracks are available) that you want to hear, turn them on and listen to and
15+
enjoy the music for as long as you want, without interruption.
16+
</p>
17+
</description>
18+
19+
<launchable type="desktop-id">Opal.desktop</launchable>
20+
21+
<screenshots>
22+
<screenshot type="default">
23+
<caption>The main window</caption>
24+
<image>https://i.imgur.com/qMAV8yS.png</image>
25+
</screenshot>
26+
</screenshots>
27+
28+
<url type="homepage">https://codedead.com/software/opal</url>
29+
</component>

.AppImage/createAppImage.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appim
33
chmod a+x appimagetool-x86_64.AppImage
44
BASEDIR=$(dirname "$0")
55
PARENT_DIR="$(dirname "$BASEDIR")"
6-
VAR="./appimagetool-x86_64.AppImage ${PARENT_DIR}/build/AppImage/Opal.AppDir ${PARENT_DIR}/build/AppImage/Opal-x86_64-$1.AppImage"
6+
VAR="./appimagetool-x86_64.AppImage -n ${PARENT_DIR}/build/AppImage/Opal.AppDir ${PARENT_DIR}/build/AppImage/Opal-x86_64-$1.AppImage"
77
eval $VAR
88
rm appimagetool-x86_64.AppImage

.github/workflows/test.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- development
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- name: Install dependencies
23+
if: ${{ matrix.os == 'ubuntu-latest' }}
24+
run: sudo apt-get install -y fuse libfuse2
25+
26+
- name: Set up JDK 20
27+
uses: actions/setup-java@v3
28+
with:
29+
java-version: '20'
30+
distribution: 'temurin'
31+
32+
- name: Test
33+
uses: gradle/gradle-build-action@v2
34+
with:
35+
arguments: test
36+
37+
- name: Build
38+
uses: gradle/gradle-build-action@v2
39+
with:
40+
arguments: build
41+
42+
- name: Build (AppImage)
43+
if: ${{ matrix.os == 'ubuntu-latest' }}
44+
uses: gradle/gradle-build-action@v2
45+
with:
46+
arguments: AppImage
47+
48+
- name: Build (jlink)
49+
uses: gradle/gradle-build-action@v2
50+
with:
51+
arguments: jlink
52+
53+
- name: Build (jpackage)
54+
uses: gradle/gradle-build-action@v2
55+
with:
56+
arguments: jpackage

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ logs/*
3838

3939
/default.properties
4040
/help.pdf
41+
.opal/

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# Opal
22

3-
![Opal](https://i.imgur.com/tNBWTPS.png)
3+
![Opal](https://i.imgur.com/qMAV8yS.png)
44

5-
![GitHub release (latest by date)](https://img.shields.io/github/v/release/CodeDead/opal)
65
![GitHub](https://img.shields.io/badge/language-Java-green)
76
![GitHub](https://img.shields.io/github/license/CodeDead/opal)
7+
![GitHub release (latest by date)](https://img.shields.io/github/v/release/CodeDead/opal)
8+
[![Test build](https://github.com/CodeDead/opal/actions/workflows/test.yml/badge.svg)](https://github.com/CodeDead/opal/actions/workflows/test.yml)
89

9-
Opal is a free and open-source JavaFX application that can play relaxing music in the background.
10+
Opal is a free and open-source [JavaFX](https://openjfx.io/) application that can play relaxing music in the background.
1011

1112
## Building
1213

@@ -59,13 +60,13 @@ especially if you're targeting a specific platform and installation method.
5960

6061
The following dependencies are universal:
6162

62-
* [JDK18](https://openjdk.java.net/projects/jdk/18/)
63+
* [JDK20](https://openjdk.java.net/projects/jdk/20/)
6364
* [JavaFX](https://openjfx.io)
6465
* [Gradle](https://gradle.org)
6566
* [FasterXML/jackson](https://github.com/FasterXML/jackson)
6667
* [badass-jlink-plugin](https://github.com/beryx/badass-jlink-plugin)
6768
* [Log4j2](https://logging.apache.org/log4j/2.x/)
68-
69+
* [AtlantaFX](https://github.com/mkpaz/atlantafx)
6970
### Windows
7071

7172
#### MSI
@@ -98,4 +99,4 @@ This library is maintained by CodeDead. You can find more about us using the fol
9899
* [Twitter](https://twitter.com/C0DEDEAD)
99100
* [Facebook](https://facebook.com/deadlinecodedead)
100101

101-
Copyright © 2022 CodeDead
102+
Copyright © 2023 CodeDead

build.gradle

+28-19
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ plugins {
55
id 'idea'
66
id 'eclipse'
77
id 'application'
8-
id "org.beryx.jlink" version "2.25.0"
8+
id 'org.beryx.jlink' version '2.26.0'
99
}
1010

1111
group 'com.codedead'
12-
version '1.0.3'
12+
version '1.1.0'
1313

1414
def currentOS = DefaultNativePlatform.currentOperatingSystem
1515

1616
java {
17-
targetCompatibility = JavaVersion.VERSION_18
18-
sourceCompatibility = JavaVersion.VERSION_18
17+
targetCompatibility = JavaVersion.VERSION_20
18+
sourceCompatibility = JavaVersion.VERSION_20
1919
}
2020

2121
application {
@@ -30,6 +30,15 @@ jlink {
3030
name = 'Opal'
3131
}
3232

33+
mergedModule {
34+
additive = true
35+
uses 'org.apache.logging.log4j.util.PropertySource'
36+
uses 'org.apache.logging.log4j.core.util.ContextDataProvider'
37+
uses 'org.apache.logging.log4j.core.util.WatchEventService'
38+
uses 'org.apache.logging.log4j.spi.Provider'
39+
uses 'org.apache.logging.log4j.message.ThreadDumpMessage.ThreadInfoFactory'
40+
}
41+
3342
if (currentOS.isWindows()) {
3443
jpackage {
3544
installerType = 'msi'
@@ -39,7 +48,7 @@ jlink {
3948
'--win-menu-group', 'CodeDead',
4049
'--win-shortcut',
4150
'--win-dir-chooser',
42-
'--copyright', 'Copyright (c) 2022 CodeDead',
51+
'--copyright', 'Copyright (c) 2023 CodeDead',
4352
'--description', 'Opal is a free and open-source JavaFX application that can play relaxing music in the background',
4453
'--vendor', 'CodeDead',
4554
'--license-file', 'LICENSE'
@@ -53,7 +62,7 @@ jlink {
5362
'--linux-shortcut',
5463
'--linux-package-name', 'opal-codedead',
5564
'--linux-rpm-license-type', 'GPLv3',
56-
'--copyright', 'Copyright (c) 2022 CodeDead',
65+
'--copyright', 'Copyright (c) 2023 CodeDead',
5766
'--description', 'Opal is a free and open-source JavaFX application that can play relaxing music in the background',
5867
'--vendor', 'CodeDead',
5968
'--license-file', 'LICENSE'
@@ -62,7 +71,7 @@ jlink {
6271
}
6372
}
6473

65-
task AppImage() {
74+
tasks.register('AppImage') {
6675
dependsOn jpackageImage
6776
doLast {
6877
copy {
@@ -77,11 +86,9 @@ task AppImage() {
7786
from '.AppImage/.AppDir/Opal.png'
7887
into "${buildDir}/AppImage/Opal.AppDir/usr/lib"
7988
}
80-
8189
exec {
8290
commandLine 'sh', "${project.rootDir}/.AppImage/createAppImage.sh", "${project.version.toString()}"
8391
}
84-
8592
delete "${buildDir}/AppImage/Opal.AppDir"
8693
}
8794
}
@@ -96,6 +103,7 @@ clean.doFirst {
96103
delete 'license.pdf'
97104
delete 'help.pdf'
98105
delete 'logs'
106+
delete '.opal'
99107
}
100108

101109
repositories {
@@ -112,17 +120,18 @@ if (currentOS.isWindows()) {
112120
}
113121

114122
dependencies {
115-
implementation "org.openjfx:javafx-base:18.0.1:${platform}"
116-
implementation "org.openjfx:javafx-controls:18.0.1:${platform}"
117-
implementation "org.openjfx:javafx-graphics:18.0.1:${platform}"
118-
implementation "org.openjfx:javafx-fxml:18.0.1:${platform}"
119-
implementation "org.openjfx:javafx-media:18.0.1:${platform}"
120-
implementation 'org.apache.logging.log4j:log4j-core:2.17.2'
121-
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.3'
122-
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
123-
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
123+
implementation "org.openjfx:javafx-base:20:${platform}"
124+
implementation "org.openjfx:javafx-controls:20:${platform}"
125+
implementation "org.openjfx:javafx-graphics:20:${platform}"
126+
implementation "org.openjfx:javafx-fxml:20:${platform}"
127+
implementation "org.openjfx:javafx-media:20:${platform}"
128+
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
129+
implementation 'io.github.mkpaz:atlantafx-base:1.2.0'
130+
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
131+
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
132+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
124133
}
125134

126-
test {
135+
tasks.named('test') {
127136
useJUnitPlatform()
128137
}

gradle/wrapper/gradle-wrapper.jar

2.2 KB
Binary file not shown.
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-8.1-20230330100852+0000-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

gradlew

+18-7
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,10 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
9087

9188
# Use the maximum available, or set MAX_FD != -1 to use that value.
9289
MAX_FD=maximum
@@ -143,12 +140,16 @@ fi
143140
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144141
case $MAX_FD in #(
145142
max*)
143+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
144+
# shellcheck disable=SC3045
146145
MAX_FD=$( ulimit -H -n ) ||
147146
warn "Could not query maximum file descriptor limit"
148147
esac
149148
case $MAX_FD in #(
150149
'' | soft) :;; #(
151150
*)
151+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
152+
# shellcheck disable=SC3045
152153
ulimit -n "$MAX_FD" ||
153154
warn "Could not set maximum file descriptor limit to $MAX_FD"
154155
esac
@@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then
193194
done
194195
fi
195196

197+
198+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
199+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
200+
196201
# Collect all arguments for the java command;
197202
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198203
# shell script including quotes and variable substitutions, so put them in
@@ -205,6 +210,12 @@ set -- \
205210
org.gradle.wrapper.GradleWrapperMain \
206211
"$@"
207212

213+
# Stop when "xargs" is not available.
214+
if ! command -v xargs >/dev/null 2>&1
215+
then
216+
die "xargs is not available"
217+
fi
218+
208219
# Use "xargs" to parse quoted args.
209220
#
210221
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

gradlew.bat

+9-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@rem limitations under the License.
1515
@rem
1616

17-
@if "%DEBUG%" == "" @echo off
17+
@if "%DEBUG%"=="" @echo off
1818
@rem ##########################################################################
1919
@rem
2020
@rem Gradle startup script for Windows
@@ -25,7 +25,8 @@
2525
if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
28-
if "%DIRNAME%" == "" set DIRNAME=.
28+
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4041

4142
set JAVA_EXE=java.exe
4243
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
44+
if %ERRORLEVEL% equ 0 goto execute
4445

4546
echo.
4647
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7576

7677
:end
7778
@rem End local scope for the variables with windows NT shell
78-
if "%ERRORLEVEL%"=="0" goto mainEnd
79+
if %ERRORLEVEL% equ 0 goto mainEnd
7980

8081
:fail
8182
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
8283
rem the _cmd.exe /c_ return code!
83-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84-
exit /b 1
84+
set EXIT_CODE=%ERRORLEVEL%
85+
if %EXIT_CODE% equ 0 set EXIT_CODE=1
86+
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87+
exit /b %EXIT_CODE%
8588

8689
:mainEnd
8790
if "%OS%"=="Windows_NT" endlocal

0 commit comments

Comments
 (0)