Skip to content

Commit

Permalink
Rebase the app on Clipper changes
Browse files Browse the repository at this point in the history
Based on Clipper v1.19.0 (commit 42b57c8d)
  • Loading branch information
mahozad committed Jul 21, 2024
1 parent e23f6e8 commit c48bf5a
Show file tree
Hide file tree
Showing 80 changed files with 3,490 additions and 2,328 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up a specific Java version
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "temurin" # OR adopt OR microsoft OR...
java-version: "21"
java-version: "17"
- name: Run all unit tests
run: ./gradlew test --stacktrace
- name: Upload test reports
if: always() # Run even if the previous steps failed
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: tests-report
path: build/reports/tests/
5 changes: 2 additions & 3 deletions .idea/runConfigurations/Tests__All_.xml

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

38 changes: 24 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ plugins {
val appRawFilesPath = rootDir.toPath() / "raw"
val appResourcesPath = rootDir.toPath() / "asset"
val vlcDirectoryName = "vlc"
val isVlcFull = System.getenv("fullVlc").toBooleanLenient() ?: false
val shouldMinifyVlc = System.getenv("minifyVlc").toBooleanLenient() ?: true
val isVlcFull = System.getenv("fullVlc").toBooleanLenient() == true
val shouldMinifyVlc = System.getenv("minifyVlc").toBooleanLenient() == true
val releaseDate: LocalDate = LocalDate.of(2024, 7, 6)

group = "ir.mahozad"
Expand All @@ -36,7 +36,7 @@ sourceSets {
// Makes the uiTestImplementation configuration extend from testImplementation,
// which means that all the declared dependencies of the test code (and transitively the main as well)
// also become dependencies of this new configuration
val uiTestImplementation by configurations.getting {
val uiTestImplementation: Configuration by configurations.getting {
extendsFrom(configurations.testImplementation.get())
}
val uiTest = task<Test>("uiTest") {
Expand Down Expand Up @@ -160,6 +160,8 @@ tasks.register(
"plugins/access/libfilesystem_plugin.dll",
// Along with audio_output/libmmdevice_plugin.dll normalizes audio loudness
"plugins/audio_filter/libnormvol_plugin.dll",
// Needed for MP3 (or audio) files with single (mono) channel
"plugins/audio_filter/libtrivial_channel_mixer_plugin.dll",
"plugins/audio_filter/libscaletempo_pitch_plugin.dll",
"plugins/audio_filter/libscaletempo_plugin.dll",
"plugins/audio_output/libdirectsound_plugin.dll",
Expand Down Expand Up @@ -209,13 +211,13 @@ tasks.register(
*/
buildConfig {
packageName("${project.group}.${project.name.lowercase()}")
buildConfigField("String", "APP_NAME", """"${project.name}"""")
buildConfigField("String", "APP_VERSION", """"${project.version}"""")
buildConfigField("String", "VLC_DIRECTORY_NAME", """"$vlcDirectoryName"""")
buildConfigField(name = "APP_NAME", value = project.name)
buildConfigField(name = "APP_VERSION", value = "${project.version}")
buildConfigField(name = "VLC_DIRECTORY_NAME", value = vlcDirectoryName)
buildConfigField(
"java.time.LocalDate",
"APP_RELEASE_DATE",
"""LocalDate.of(${releaseDate.year}, ${releaseDate.monthValue}, ${releaseDate.dayOfMonth})"""
name = "APP_RELEASE_DATE",
type = "java.time.LocalDate",
expression = """LocalDate.parse("$releaseDate")"""
)
}

Expand Down Expand Up @@ -305,12 +307,20 @@ compose.desktop {
* It seems that the Windows OS does not respect the GIF speed and no-loop settings and
* plays the animation at a low frame rate. See https://stackoverflow.com/q/25382400
*/
jvmArgs += "-splash:app/resources/splash-screen.gif"
jvmArgs += "-splash:${'$'}APPDIR/resources/splash-screen.gif"
nativeDistributions {
// java.naming is to prevent app crash when running the app exe
// (introduced with ch.qos.logback:logback-classic version 1.4.5)
// jdk.unsupported is for showing the display image when running the app exe
modules("java.naming", "jdk.unsupported")
modules(
// For preventing app crash when running the app exe
// (introduced in ch.qos.logback:logback-classic version 1.4.5)
"java.naming",
// For showing the display image when running the app exe
// (introduced in app version 1.5.0 by reimplementing the media player)
"jdk.unsupported",
// For playing local files when running the app exe (introduced in CMP version 1.6.0)
"jdk.accessibility",
// For launching the app using "Open with" on a file (required by Apache Tika)
"java.sql"
)
targetFormats(Dmg, Msi, Exe, Deb)
packageVersion = "${project.version}.0.0"
packageName = project.name
Expand Down
36 changes: 18 additions & 18 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
[versions]
gradle = "8.6"
jvm = "21"
gradle = "8.8"
jvm = "17"
kotlin = "1.9.22"
proguard = "7.4.2"
compose-multiplatform = "1.5.12"
buildConfig = "4.1.2"
buildDownload = "5.5.0"
compose-multiplatform = "1.6.0"
buildConfig = "5.3.5"
buildDownload = "5.6.0"
kotlin-coroutines = "1.8.0"
logback = "1.4.11"
log4jToSlf4j = "2.21.1"
kotlinLogging = "5.1.0"
ffmpeg = "5.1.2-1.5.8"
vlc = "3.0.20"
vlcj = "4.8.2"
upx = "4.2.1"
wavySlider="1.0.0"
logback = "1.5.5"
log4jToSlf4j = "2.23.1"
kotlinLogging = "6.0.9"
ffmpeg = "6.1.1-1.5.10"
vlc = "3.0.21"
vlcj = "4.8.3"
upx = "4.2.3"
wavySlider="1.3.0"
persianDateTime = "4.2.1"
junit5 = "5.10.0"
assertj = "3.24.2"
mockk = "1.13.8"
tika = "2.9.1"
jna = "5.13.0"
junit5 = "5.10.2"
assertj = "3.25.3"
mockk = "1.13.10"
tika = "2.9.2"
jna = "5.14.0"
jaudioTagger = "3.0.1"
image-comparison = "4.4.0"

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.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
networkTimeout=60000
validateDistributionUrl=false
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion 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/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/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 Down
Loading

0 comments on commit c48bf5a

Please sign in to comment.