Skip to content

Commit

Permalink
Merge pull request #73 from CodeDead/release/v1.1.0
Browse files Browse the repository at this point in the history
Release/v1.1.0
  • Loading branch information
CodeDead authored Apr 2, 2023
2 parents 2100d61 + 31d0001 commit f73dd58
Show file tree
Hide file tree
Showing 53 changed files with 1,418 additions and 913 deletions.
29 changes: 29 additions & 0 deletions .AppImage/.AppDir/usr/share/metainfo/Opal.appdata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>com.codedead.opal</id>
<metadata_license>FSFAP</metadata_license>
<project_license>GPL-3.0-only</project_license>
<name>Opal</name>
<summary>Play relaxing music in the background</summary>

<description>
<p>
Opal is a free and open-source JavaFX application that can play relaxing music in the background.
</p>
<p>
Select the sounds (20+ relaxing tracks are available) that you want to hear, turn them on and listen to and
enjoy the music for as long as you want, without interruption.
</p>
</description>

<launchable type="desktop-id">Opal.desktop</launchable>

<screenshots>
<screenshot type="default">
<caption>The main window</caption>
<image>https://i.imgur.com/qMAV8yS.png</image>
</screenshot>
</screenshots>

<url type="homepage">https://codedead.com/software/opal</url>
</component>
2 changes: 1 addition & 1 deletion .AppImage/createAppImage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appim
chmod a+x appimagetool-x86_64.AppImage
BASEDIR=$(dirname "$0")
PARENT_DIR="$(dirname "$BASEDIR")"
VAR="./appimagetool-x86_64.AppImage ${PARENT_DIR}/build/AppImage/Opal.AppDir ${PARENT_DIR}/build/AppImage/Opal-x86_64-$1.AppImage"
VAR="./appimagetool-x86_64.AppImage -n ${PARENT_DIR}/build/AppImage/Opal.AppDir ${PARENT_DIR}/build/AppImage/Opal-x86_64-$1.AppImage"
eval $VAR
rm appimagetool-x86_64.AppImage
56 changes: 56 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Test

on:
pull_request:
branches:
- master
- development

permissions:
contents: read

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Install dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install -y fuse libfuse2

- name: Set up JDK 20
uses: actions/setup-java@v3
with:
java-version: '20'
distribution: 'temurin'

- name: Test
uses: gradle/gradle-build-action@v2
with:
arguments: test

- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build

- name: Build (AppImage)
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: gradle/gradle-build-action@v2
with:
arguments: AppImage

- name: Build (jlink)
uses: gradle/gradle-build-action@v2
with:
arguments: jlink

- name: Build (jpackage)
uses: gradle/gradle-build-action@v2
with:
arguments: jpackage
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ logs/*

/default.properties
/help.pdf
.opal/
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Opal

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

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

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

## Building

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

The following dependencies are universal:

* [JDK18](https://openjdk.java.net/projects/jdk/18/)
* [JDK20](https://openjdk.java.net/projects/jdk/20/)
* [JavaFX](https://openjfx.io)
* [Gradle](https://gradle.org)
* [FasterXML/jackson](https://github.com/FasterXML/jackson)
* [badass-jlink-plugin](https://github.com/beryx/badass-jlink-plugin)
* [Log4j2](https://logging.apache.org/log4j/2.x/)

* [AtlantaFX](https://github.com/mkpaz/atlantafx)
### Windows

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

Copyright © 2022 CodeDead
Copyright © 2023 CodeDead
47 changes: 28 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ plugins {
id 'idea'
id 'eclipse'
id 'application'
id "org.beryx.jlink" version "2.25.0"
id 'org.beryx.jlink' version '2.26.0'
}

group 'com.codedead'
version '1.0.3'
version '1.1.0'

def currentOS = DefaultNativePlatform.currentOperatingSystem

java {
targetCompatibility = JavaVersion.VERSION_18
sourceCompatibility = JavaVersion.VERSION_18
targetCompatibility = JavaVersion.VERSION_20
sourceCompatibility = JavaVersion.VERSION_20
}

application {
Expand All @@ -30,6 +30,15 @@ jlink {
name = 'Opal'
}

mergedModule {
additive = true
uses 'org.apache.logging.log4j.util.PropertySource'
uses 'org.apache.logging.log4j.core.util.ContextDataProvider'
uses 'org.apache.logging.log4j.core.util.WatchEventService'
uses 'org.apache.logging.log4j.spi.Provider'
uses 'org.apache.logging.log4j.message.ThreadDumpMessage.ThreadInfoFactory'
}

if (currentOS.isWindows()) {
jpackage {
installerType = 'msi'
Expand All @@ -39,7 +48,7 @@ jlink {
'--win-menu-group', 'CodeDead',
'--win-shortcut',
'--win-dir-chooser',
'--copyright', 'Copyright (c) 2022 CodeDead',
'--copyright', 'Copyright (c) 2023 CodeDead',
'--description', 'Opal is a free and open-source JavaFX application that can play relaxing music in the background',
'--vendor', 'CodeDead',
'--license-file', 'LICENSE'
Expand All @@ -53,7 +62,7 @@ jlink {
'--linux-shortcut',
'--linux-package-name', 'opal-codedead',
'--linux-rpm-license-type', 'GPLv3',
'--copyright', 'Copyright (c) 2022 CodeDead',
'--copyright', 'Copyright (c) 2023 CodeDead',
'--description', 'Opal is a free and open-source JavaFX application that can play relaxing music in the background',
'--vendor', 'CodeDead',
'--license-file', 'LICENSE'
Expand All @@ -62,7 +71,7 @@ jlink {
}
}

task AppImage() {
tasks.register('AppImage') {
dependsOn jpackageImage
doLast {
copy {
Expand All @@ -77,11 +86,9 @@ task AppImage() {
from '.AppImage/.AppDir/Opal.png'
into "${buildDir}/AppImage/Opal.AppDir/usr/lib"
}

exec {
commandLine 'sh', "${project.rootDir}/.AppImage/createAppImage.sh", "${project.version.toString()}"
}

delete "${buildDir}/AppImage/Opal.AppDir"
}
}
Expand All @@ -96,6 +103,7 @@ clean.doFirst {
delete 'license.pdf'
delete 'help.pdf'
delete 'logs'
delete '.opal'
}

repositories {
Expand All @@ -112,17 +120,18 @@ if (currentOS.isWindows()) {
}

dependencies {
implementation "org.openjfx:javafx-base:18.0.1:${platform}"
implementation "org.openjfx:javafx-controls:18.0.1:${platform}"
implementation "org.openjfx:javafx-graphics:18.0.1:${platform}"
implementation "org.openjfx:javafx-fxml:18.0.1:${platform}"
implementation "org.openjfx:javafx-media:18.0.1:${platform}"
implementation 'org.apache.logging.log4j:log4j-core:2.17.2'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.3'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
implementation "org.openjfx:javafx-base:20:${platform}"
implementation "org.openjfx:javafx-controls:20:${platform}"
implementation "org.openjfx:javafx-graphics:20:${platform}"
implementation "org.openjfx:javafx-fxml:20:${platform}"
implementation "org.openjfx:javafx-media:20:${platform}"
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
implementation 'io.github.mkpaz:atlantafx-base:1.2.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
}

test {
tasks.named('test') {
useJUnitPlatform()
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-8.1-20230330100852+0000-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
25 changes: 18 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -143,12 +140,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand All @@ -205,6 +210,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
15 changes: 9 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,8 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

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

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

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

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
Loading

0 comments on commit f73dd58

Please sign in to comment.