Skip to content

Commit

Permalink
feat: Update all deps and rewrite of view architecture (#1)
Browse files Browse the repository at this point in the history
* feat: Update all deps and begin rewrite of view architecture

* No more loading screens

* Make login async and wait for login in data fetching

* Support Wayland for opening the browser

via xdg-open

* Schedule and Episodelist Rework

* Tabs cleanup and save scroll states in all tabs

* Watched Progress and Favourites now properly update the UI

* Bump common lib and compose

* Bump common

* New update check and toast testing

* Move toaster to compose, make settingsview work as screen

* SettingsView rework, new mono font, new update downloader

* Fix legacyFileCleanup

* Add MPV Tips section and set version to something to test

* Add foojay resolver

* 0.1.0-rc1 Build Test

* Add checksum printing and uploading to workflows

* 0.1.0 Build Test

* Fix DiscordRPC Timestamp

* Add some spacing for the linux download buttons

* Fix offline usage with new common-compose
  • Loading branch information
Vodes authored Dec 6, 2024
1 parent 2e8f1e0 commit 23f2eec
Show file tree
Hide file tree
Showing 56 changed files with 1,481 additions and 739 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/Build-Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ jobs:
env:
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
run: "./gradlew packageReleaseUberJarForCurrentOS"
- name: "Print and save sha384 for binaries"
run: find ./build/compose -type f \( -iname Styx\*linux\*.jar -o -iname \*.deb -o -iname \*.rpm \) -exec shasum -a 384 {} \; | tee checksums.sha384
- name: "Upload checksum file"
uses: actions/upload-artifact@v4
with:
name: checksums.sha384
path: checksums.sha384
- name: "Upload binaries to FTP"
uses: "SamKirkland/[email protected]"
with:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/Build-Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ jobs:
env:
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
run: ./gradlew.bat packageReleaseUberJarForCurrentOS
- name: "Print and save sha384 for binaries"
shell: pwsh
run: |
Get-ChildItem -Path .\build\compose -Recurse -File -Include Styx*windows*.jar,*.msi | ForEach-Object {
$hash = Get-FileHash -Path $_.FullName -Algorithm SHA384
"$($hash.Hash) $($_.Name)"
} | Tee-Object -FilePath checksums.sha384
- name: "Upload checksum file"
uses: actions/upload-artifact@v4
with:
name: checksums.sha384
path: checksums.sha384
- name: "Upload binaries to FTP"
uses: "SamKirkland/[email protected]"
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ build/
!**/src/main/**/build/
!**/src/test/**/build/
local.properties
checksums.sha384


### IntelliJ IDEA ###
Expand Down
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

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

3 changes: 1 addition & 2 deletions .idea/misc.xml

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

13 changes: 13 additions & 0 deletions .idea/runConfigurations.xml

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

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

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

31 changes: 17 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import org.jetbrains.compose.desktop.application.dsl.TargetFormat

plugins {
kotlin("jvm") version "1.9.23"
id("org.jetbrains.compose") version "1.6.1"
id("org.jetbrains.kotlin.plugin.serialization") version "1.9.23"
id("com.github.gmazzo.buildconfig") version "5.3.5"
id("org.ajoberstar.grgit") version "5.2.1"
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.compose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.buildconfig)
}

group = "moe.styx"
version = "0.0.7"
version = "0.1.0"

repositories {
google()
Expand All @@ -30,18 +30,19 @@ dependencies {
implementation(compose.materialIconsExtended)

// Misc
implementation("org.slf4j:slf4j-simple:2.0.9")
implementation("net.lingala.zip4j:zip4j:2.11.5")
implementation("com.github.caoimhebyrne:KDiscordIPC:0.2.2")
implementation("com.squareup.okio:okio:3.9.0")
implementation(libs.slf4j.simple)
implementation(libs.zip4j)
implementation(libs.kdiscord.ipc)
implementation(libs.okio)

// Styx
implementation("moe.styx:styx-common-compose-jvm:0.0.5")
implementation(libs.styx.common.compose)
}

compose.desktop {
application {
mainClass = "moe.styx.MainKt"
jvmArgs += listOf("-Xmx1250M", "-Xms300M")
buildTypes.release.proguard {
configurationFiles.from(project.file("proguard.rules"))
}
Expand All @@ -62,19 +63,21 @@ compose.desktop {
vendor = "Vodes & Styx contributors"
licenseFile.set(project.file("LICENSE"))
windows {
packageVersion = project.version.toString().split("-")[0]
menuGroup = "Styx"
upgradeUuid = System.getenv("STYX_APP_GUID")
iconFile.set(project.file("src/main/resources/icons/icon.ico"))
}
linux {
packageVersion = project.version.toString().split("-")[0]
iconFile.set(project.file("src/main/resources/icons/icon.png"))
menuGroup = "AudioVideo;Video"
shortcut = true
}
macOS {
packageVersion = project.version.toString().let {
if (it.startsWith("0.")) it.replaceFirst("0.", "1.") else it
}
}.split("-")[0]
appStore = false
iconFile.set(project.file("src/main/resources/icons/icon.icns"))
}
Expand All @@ -92,8 +95,8 @@ buildConfig {
buildConfigField("IMAGE_URL", System.getenv("STYX_IMAGEURL")) // Example: https://images.company.com
buildConfigField("SITE", siteURL.split("https://").getOrElse(1) { siteURL })
buildConfigField("BUILD_TIME", (System.currentTimeMillis() / 1000))
buildConfigField("VERSION_CHECK_URL", "https://raw.githubusercontent.com/Vodes/Styx-2/master/build.gradle.kts")
buildConfigField("DISCORD_CLIENT_ID", "")//System.getenv("STYX_DISCORDCLIENT"))
buildConfigField("VERSION_CHECK_URL", "https://api.github.com/repos/Vodes/Styx-2/tags")
buildConfigField("DISCORD_CLIENT_ID", "686174250259709983")
}

kotlin {
Expand Down
23 changes: 23 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[versions]
kotlin = "2.0.21"
compose = "1.7.1"
styx-common-compose = "0.1.1"
buildconfig = "5.4.0"
slf4j-simple = "2.0.16"
okio = "3.9.0"
kdiscord-ipc = "0.2.2"
zip4j = "2.11.5"

[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
compose = { id = "org.jetbrains.compose", version.ref = "compose" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig" }

[libraries]
zip4j = { module = "net.lingala.zip4j:zip4j", version.ref = "zip4j" }
kdiscord-ipc = { module = "com.github.caoimhebyrne:KDiscordIPC", version.ref = "kdiscord-ipc" }
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }
slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j-simple" }
styx-common-compose = { module = "moe.styx:styx-common-compose-jvm", version.ref = "styx-common-compose" }
4 changes: 3 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ pluginManagement {
gradlePluginPortal()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}

}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0"
}
rootProject.name = "Styx 2"

Loading

0 comments on commit 23f2eec

Please sign in to comment.