Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/gradle/org.xerial-sqlite-jdbc-…
Browse files Browse the repository at this point in the history
…3.44.1.0
  • Loading branch information
Joseph5610 authored Feb 27, 2024
2 parents ef9e622 + d2aab91 commit 98284a9
Show file tree
Hide file tree
Showing 52 changed files with 344 additions and 203 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ on:
jobs:
build:
name: "Build and create APP file"
runs-on: macos-11
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '20'
java-version: '21'
java-package: jdk
- run: ./gradlew -i jfxNative
- name: Find zipball on filesystem
id: find-zipball
run: echo "ZIPBALL_PATH=$(find . -name "FXRadio-*.zip")" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: FXRadio.zip
path: ${{ env.ZIPBALL_PATH }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
prepareRelease:
if: startsWith(github.ref, 'refs/tags/')
name: Prepare Release
runs-on: macos-11
runs-on: macos-13
# Map a step output to a job output
outputs:
uploadUrl: ${{ steps.create_release.outputs.upload_url }}
Expand All @@ -33,15 +33,15 @@ jobs:
build:
if: startsWith(github.ref, 'refs/tags/')
name: Build macOS Release
runs-on: macos-12
runs-on: macos-13
needs:
- prepareRelease
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '20'
java-version: '21'
java-package: jdk
- run: ./gradlew -i jfxNative
- name: Find DMG file on filesystem
Expand All @@ -64,13 +64,13 @@ jobs:
needs:
- prepareRelease
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" >> $GITHUB_PATH
shell: bash
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '20'
java-version: '21'
java-package: jdk
- run: ./gradlew -i jfxNative
- name: Find MSI file on filesystem
Expand Down
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 22 additions & 21 deletions .run/FxRadio_Run.run.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="FxRadio_Run" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName"/>
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
<option name="externalSystemIdString" value="GRADLE"/>
<option name="scriptParameters" value=""/>
<option name="taskDescriptions">
<list/>
</option>
<option name="taskNames">
<list>
<option value="run"/>
</list>
</option>
<option name="vmOptions" value="-Xms256m -Xmx2048m -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC"/>
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2"/>
</configuration>
<configuration default="false" name="FxRadio_Run" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="run" />
</list>
</option>
<option name="vmOptions" value="-Xms256m -Xmx1500m -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ sudo xattr -r -d com.apple.quarantine /Applications/FXRadio.app/

# Build

App requires JDK 20 and JavaFX 20 to build and run.
App requires JDK 20 and JavaFX 21 to build and run.

To build the app yourself:

Expand Down
2 changes: 1 addition & 1 deletion api-client/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version = "0.10"

dependencies {
api(platform("com.squareup.okhttp3:okhttp-bom:4.10.0"))
api(platform("com.squareup.okhttp3:okhttp-bom:4.11.0"))
api("com.google.code.gson:gson:2.10.1") // patch for CVE-2022-25647
api("com.squareup.okhttp3:logging-interceptor")
api("com.squareup.okhttp3:okhttp-dnsoverhttps")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object ApiUtils {
/**
* Stations from those countries are filtered in the whole application
*/
internal val COUNTRY_IGNORE_LIST = listOf("RU", "BY")
internal val COUNTRY_IGNORE_LIST = listOf("RU", "BY", "PS")

/**
* Returns true if the [url] is valid HTTP or HTTPS URL
Expand Down
15 changes: 8 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {
}

plugins {
kotlin("jvm") version "1.9.10"
kotlin("jvm") version "1.9.22"
id("org.openjfx.javafxplugin") version "0.0.14"
id("application")
}
Expand All @@ -33,7 +33,7 @@ val testFxVersion = "4.0.16-alpha"
val junitVersion = "5.10.0"
val vlcjVersion = "4.8.2"
val humbleVersion = "0.3.0"
val flywayVersion = "9.21.2"
val flywayVersion = "10.1.0"
val controlsFxVersion = "11.1.2"

val defaultAppJvmArgs = listOf(
Expand All @@ -50,7 +50,7 @@ val defaultAppJvmArgs = listOf(
"--add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED"
)

version = "0.18.0"
version = "0.19.0"

val appVersion: String = version as String

Expand Down Expand Up @@ -79,7 +79,7 @@ allprojects {

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(20))
languageVersion.set(JavaLanguageVersion.of(21))
vendor.set(JvmVendorSpec.ADOPTIUM)
}
}
Expand Down Expand Up @@ -141,7 +141,7 @@ configurations {
}

javafx {
version = "20.0.2"
version = "21.0.2"
modules = mutableListOf("javafx.controls", "javafx.media")
}

Expand All @@ -151,11 +151,12 @@ application {
}

task<PackageTask>("jfxNative") {
val outputDir = project.layout.buildDirectory.dir("jfx/native")
mainClass = "online.hudacek.fxradio.FxRadioKt"
appName = "FXRadio"
appDescription = "Internet Radio Directory"
assetsDir = File("${project.rootDir}/src/main/deploy/package")
outputDirectory = File("${project.buildDir}/jfx/native")
outputDirectory = outputDir.get().asFile
displayName = "FXRadio"
version = appVersion
url = "https://hudacek.online/fxradio"
Expand Down Expand Up @@ -192,7 +193,7 @@ task<PackageTask>("jfxNative") {
dependsOn("jar")
vmArgs = listOf(
"-Xms256m",
"-Xmx2048m",
"-Xmx1500m",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseG1GC"
)
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
14 changes: 7 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ 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
# shellcheck disable=SC2039,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
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -202,11 +202,11 @@ 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
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
21 changes: 10 additions & 11 deletions src/main/kotlin/online/hudacek/fxradio/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,26 @@ package online.hudacek.fxradio
object Config {

object Resources {
const val appLogo = "radio-icon-applogo.png"
const val stageIcon = "radio-logo-stageicon.png"
const val trayIcon = "/radio-icon-applogo.png"
const val waveIcon = "radio-logo-big.png"
const val APP_LOGO = "radio-icon-applogo.png"
const val APP_STAGE_ICON = "radio-logo-stageicon.png"
const val APP_TRAY_ICON = "/radio-icon-applogo.png"
const val APP_WAVE_ICON = "radio-logo-big.png"
}

object API {
const val dnsLookupURL = "all.api.radio-browser.info"
const val fallbackApiServerURL = "nl1.api.radio-browser.info"
const val repositoryURL = "https://github.com/Joseph5610/fxradio/"
const val radioBrowserUrl = "https://radio-browser.info"
const val musicBrainzApi = "https://musicbrainz.org/ws/2/"
const val coverArtApiUrl = "https://coverartarchive.org/release/"
const val DNS_LOOKUP_URL = "all.api.radio-browser.info"
const val FALLBACK_URL = "nl1.api.radio-browser.info"
const val BASE_URL = "https://radio-browser.info"
const val MUSICBRAINZ_URL = "https://musicbrainz.org/ws/2/"
const val COVER_ART_URL = "https://coverartarchive.org/release/"
}

/**
* Paths to common locations
* All user files should be stored in $USER_HOME/.fxradio/ directory
*/
object Paths {
private val appName = FxRadio.appName.lowercase()
private val appName = FxRadio.APP_NAME.lowercase()

val baseAppPath = System.getProperty("user.home") + "/.$appName"
val confDirPath = "$baseAppPath/conf"
Expand Down
9 changes: 5 additions & 4 deletions src/main/kotlin/online/hudacek/fxradio/FxRadio.kt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ open class FxRadio(
y = it
}
}
setStageIcon(Image(Config.Resources.stageIcon))
setStageIcon(Image(Config.Resources.APP_STAGE_ICON))
super.start(this)
}

Expand Down Expand Up @@ -154,9 +154,10 @@ open class FxRadio(
*/
companion object {

const val appName = "FXRadio"
const val appUrl = "https://hudacek.online/fxradio/"
const val author = "hudacek.online"
const val APP_NAME = "FXRadio"
const val APP_URL = "https://hudacek.online/fxradio/"
const val APP_AUTHOR = "hudacek.online"
const val APP_GITHUB_URL = "https://github.com/Joseph5610/fxradio/"
val copyright = "Copyright (c) 2020-" + Year.now().value

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ private val logger = KotlinLogging.logger {}
object MusicBrainzApiProvider : AbstractApiProvider<MusicBrainzApi>() {

override val serviceProvider by lazy {
ServiceProvider(Config.API.musicBrainzApi).also {
ServiceProvider(Config.API.MUSICBRAINZ_URL).also {
logger.info { "Initialized MusicBrainz API provider" }
}
}
Expand Down
Loading

0 comments on commit 98284a9

Please sign in to comment.