Skip to content

Commit

Permalink
Merge pull request #6 from Joseph5610/develop
Browse files Browse the repository at this point in the history
Release 0.8
  • Loading branch information
Joseph5610 authored Nov 1, 2021
2 parents b817a45 + 9e7a09e commit b916a0d
Show file tree
Hide file tree
Showing 129 changed files with 2,091 additions and 1,355 deletions.
101 changes: 101 additions & 0 deletions .github/workflows/detekt-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# This workflow performs a static analysis of your Kotlin source code using
# Detekt.
#
# Scans are triggered:
# 1. On every push to default and protected branches
# 2. On every Pull Request targeting the default branch
# 3. On a weekly schedule
# 4. Manually, on demand, via the "workflow_dispatch" event
#
# The workflow should work with no modifications, but you might like to use a
# later version of the Detekt CLI by modifing the $DETEKT_RELEASE_TAG
# environment variable.
name: Scan with Detekt

on:
# Triggers the workflow on push or pull request events but only for default and protected branches
push:
branches: [ master, develop ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
# Release tag associated with version of Detekt to be installed
# SARIF support (required for this workflow) was introduced in Detekt v1.15.0
DETEKT_RELEASE_TAG: v1.15.0

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "scan"
scan:
name: Scan
# The type of runner that the job will run on
runs-on: macos-10.15

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Gets the download URL associated with the $DETEKT_RELEASE_TAG
- name: Get Detekt download URL
id: detekt_info
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
DETEKT_DOWNLOAD_URL=$( gh api graphql --field tagName=$DETEKT_RELEASE_TAG --raw-field query='
query getReleaseAssetDownloadUrl($tagName: String!) {
repository(name: "detekt", owner: "detekt") {
release(tagName: $tagName) {
releaseAssets(name: "detekt", first: 1) {
nodes {
downloadUrl
}
}
}
}
}
' | \
jq --raw-output '.data.repository.release.releaseAssets.nodes[0].downloadUrl' )
echo "::set-output name=download_url::$DETEKT_DOWNLOAD_URL"
# Sets up the detekt cli
- name: Setup Detekt
run: |
dest=$( mktemp -d )
curl --request GET \
--url ${{ steps.detekt_info.outputs.download_url }} \
--silent \
--location \
--output $dest/detekt
chmod a+x $dest/detekt
echo $dest >> $GITHUB_PATH
# Performs static analysis using Detekt
- name: Run Detekt
continue-on-error: true
run: |
detekt --input ${{ github.workspace }} --report sarif:${{ github.workspace }}/detekt.sarif.json
# Modifies the SARIF output produced by Detekt so that absolute URIs are relative
# This is so we can easily map results onto their source files
# This can be removed once relative URI support lands in Detekt: https://git.io/JLBbA
- name: Make artifact location URIs relative
continue-on-error: true
run: |
echo "$(
jq \
--arg github_workspace ${{ github.workspace }} \
'. | ( .runs[].results[].locations[].physicalLocation.artifactLocation.uri |= if test($github_workspace) then .[($github_workspace | length | . + 1):] else . end )' \
${{ github.workspace }}/detekt.sarif.json
)" > ${{ github.workspace }}/detekt.sarif.json
# Uploads results to GitHub repository using the upload-sarif action
- uses: github/codeql-action/upload-sarif@v1
with:
# Path to SARIF file relative to the root of the repository
sarif_file: ${{ github.workspace }}/detekt.sarif.json
checkout_path: ${{ github.workspace }}
11 changes: 11 additions & 0 deletions .idea/dataSources.xml

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

7 changes: 7 additions & 0 deletions .idea/sqldialects.xml

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

86 changes: 44 additions & 42 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ buildscript {
}

plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.70'
id 'org.jetbrains.kotlin.jvm' version '1.4.32'
}

apply plugin: 'javafx-gradle-plugin'

version "0.7.0"
version "0.8.0"

compileKotlin {
kotlinOptions.jvmTarget = 1.8
Expand All @@ -26,7 +26,7 @@ compileTestKotlin {
}

ext.versions = [
kotlin : "1.3.0",
kotlin : "1.4.32",
kotlinCoroutines : "1.3.4",
tornadofx : "1.7.20",
controlsfx : "8.40.17",
Expand All @@ -35,68 +35,70 @@ ext.versions = [
retrofitAdapters : "2.9.0",
retrofitLogger : "3.14.9",

kotlinLogging : "1.7.9",
slf4j : "1.7.5",
log4j2 : "2.9.1",
kotlinLogging : "1.12.5",
slf4j : "1.7.32",
log4j2 : "2.14.1",
commonsio : "2.6",
rxkotlinfx : "2.2.2",
humble : "0.3.0",
vlcj : "4.4.0",
vlcj : "4.7.1",
sqliteJdbc : "3.21.0.1",
rxkotlinJdbc : "0.4.1",
nsmenufx : "2.1.7",
semver : "3.1.0",
testfx : "4.0.16-alpha",
junit : "5.4.0",
awaitility : "4.0.3",
flagIcon : "1.1.0"
flagIcon : "1.1.0",
flyway : "7.10.0"
]

dependencies {
// Align versions of all Kotlin components
compile platform('org.jetbrains.kotlin:kotlin-bom')

//local jars
// Local JAR files
compile fileTree(include: ['*.jar'], dir: 'libs')

// Use the Kotlin JDK 8 standard library.
compile 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
runtime group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: versions.kotlin
compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:$versions.kotlinCoroutines"
// Use the Kotlin JDK 8 standard library
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
compile("org.jetbrains.kotlin:kotlin-reflect")
compile("org.jetbrains.kotlinx:kotlinx-coroutines-core:$versions.kotlinCoroutines")

compile "no.tornado:tornadofx:$versions.tornadofx"
compile "org.controlsfx:controlsfx:$versions.controlsfx"
compile "no.tornado:tornadofx-controlsfx:$versions.tornadofxControlsfx"
compile("no.tornado:tornadofx:$versions.tornadofx")
compile("org.controlsfx:controlsfx:$versions.controlsfx")
compile("no.tornado:tornadofx-controlsfx:$versions.tornadofxControlsfx")

compile "com.squareup.retrofit2:retrofit:$versions.retrofit"
compile "com.squareup.retrofit2:adapter-rxjava2:$versions.retrofitAdapters"
compile "com.squareup.retrofit2:converter-gson:$versions.retrofitAdapters"
compile "com.squareup.okhttp3:logging-interceptor:$versions.retrofitLogger"
compile("com.squareup.retrofit2:retrofit:$versions.retrofit")
compile("com.squareup.retrofit2:adapter-rxjava2:$versions.retrofitAdapters")
compile("com.squareup.retrofit2:converter-gson:$versions.retrofitAdapters")
compile("com.squareup.okhttp3:logging-interceptor:$versions.retrofitLogger")

compile "io.github.microutils:kotlin-logging:$versions.kotlinLogging"
compile "org.slf4j:slf4j-api:$versions.slf4j"
compile "org.apache.logging.log4j:log4j-slf4j-impl:$versions.log4j2"
compile "org.apache.logging.log4j:log4j-api:$versions.log4j2"
compile "org.apache.logging.log4j:log4j-core:$versions.log4j2"
compile("io.github.microutils:kotlin-logging:$versions.kotlinLogging")
compile("org.slf4j:slf4j-api:$versions.slf4j")
compile("org.apache.logging.log4j:log4j-slf4j-impl:$versions.log4j2")
compile("org.apache.logging.log4j:log4j-api:$versions.log4j2")
compile("org.apache.logging.log4j:log4j-core:$versions.log4j2")

compile "commons-io:commons-io:$versions.commonsio"
compile("commons-io:commons-io:$versions.commonsio")

compile "com.github.thomasnield:rxkotlinfx:$versions.rxkotlinfx"
compile "org.xerial:sqlite-jdbc:$versions.sqliteJdbc"
compile "org.nield:rxkotlin-jdbc:$versions.rxkotlinJdbc"
compile "de.codecentric.centerdevice:centerdevice-nsmenufx:$versions.nsmenufx"
compile("com.github.thomasnield:rxkotlinfx:$versions.rxkotlinfx")
compile("org.xerial:sqlite-jdbc:$versions.sqliteJdbc")
compile("org.nield:rxkotlin-jdbc:$versions.rxkotlinJdbc")
compile("de.codecentric.centerdevice:centerdevice-nsmenufx:$versions.nsmenufx")
compile("org.flywaydb:flyway-core:$versions.flyway")

compile "org.codehaus.griffon.plugins:griffon-flagicons-javafx:$versions.flagIcon"
compile("org.codehaus.griffon.plugins:griffon-flagicons-javafx:$versions.flagIcon")

//Players
compile "io.humble:humble-video-all:$versions.humble"
compile "uk.co.caprica:vlcj:$versions.vlcj"

testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$versions.junit"
testCompile "org.junit.jupiter:junit-jupiter-api:$versions.junit"
testCompile "org.testfx:testfx-core:$versions.testfx"
testCompile "org.testfx:testfx-junit5:$versions.testfx"
testCompile "org.awaitility:awaitility:$versions.awaitility"
compile("io.humble:humble-video-all:$versions.humble")
compile("uk.co.caprica:vlcj:$versions.vlcj")

testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$versions.junit")
testCompile("org.junit.jupiter:junit-jupiter-api:$versions.junit")
testCompile("org.junit.jupiter:junit-jupiter-params:$versions.junit")
testCompile("org.testfx:testfx-core:$versions.testfx")
testCompile("org.testfx:testfx-junit5:$versions.testfx")
testCompile("org.testfx:openjfx-monocle:8u76-b04")
}

sourceSets {
Expand Down Expand Up @@ -136,10 +138,10 @@ jfx {

additionalAppResources = 'src/main/deploy/additional'
String runtimePath = System.getenv('JAVA_HOME')
if(runtimePath != null && System.getenv('FX_APPEND_PATH') != null) {
if (runtimePath != null && System.getenv('FX_APPEND_PATH') != null) {
runtimePath = runtimePath + System.getenv('FX_APPEND_PATH')
}
logger.warn('Runtime path is: {}', runtimePath)
logger.info('Runtime path is: {}', runtimePath)
bundleArguments = [
licenseType: 'ASL 2.0',
licenseFile: 'LICENSE', //,
Expand Down
7 changes: 5 additions & 2 deletions src/main/kotlin/online/hudacek/fxradio/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ object Config {
object API {
const val dnsLookupURL = "all.api.radio-browser.info"
const val fallbackApiServerURL = "de1.api.radio-browser.info"
const val mapURL = "http://m2-multiplayer.eu/fxmap/"
}

/**
Expand All @@ -39,7 +40,7 @@ object Config {
object Paths {
private val appName = FxRadio.appName.toLowerCase()

val baseAppPath = System.getProperty("user.home") + "/.$appName/"
val baseAppPath = System.getProperty("user.home") + "/.$appName"
val confDirPath = "$baseAppPath/conf"
val cacheDirPath = "$baseAppPath/cache"
val dbPath = "$baseAppPath/$appName.db"
Expand All @@ -51,6 +52,8 @@ object Config {
*/
object Flags {
const val darkStylesEnabled = false
const val enableStationDebug = true
const val useTrayIcon = false
const val enableStationDebug = false
const val enableMap = true
}
}
Loading

0 comments on commit b916a0d

Please sign in to comment.