mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-10 06:42:05 +01:00
Fix MacOS Build
This commit is contained in:
15
.github/workflows/Build.yml
vendored
15
.github/workflows/Build.yml
vendored
@@ -30,13 +30,7 @@ jobs:
|
||||
arch: x64
|
||||
os: macOS-latest
|
||||
shell: bash
|
||||
build: |
|
||||
packageUberJarForCurrentOS \
|
||||
packageDmg notarizeDmg \
|
||||
-Pcompose.desktop.mac.sign=true \
|
||||
-Pcompose.desktop.mac.signing.identity=${{ secrets.APPLE_IDENTITY }} \
|
||||
-Pcompose.desktop.mac.notarization.appleID=${{ secrets.APPLE_ID }} \
|
||||
-Pcompose.desktop.mac.notarization.password=${{ secrets.APPLE_PASSWORD }}
|
||||
build: packageUberJarForCurrentOS packageDmg notarizeDmg
|
||||
setupCl: ./scripts/SetupClUnix.sh
|
||||
|
||||
- runtime: win-x64
|
||||
@@ -83,7 +77,12 @@ jobs:
|
||||
if: ${{ matrix.runtime != 'linux-centos-x64' }}
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: ${{ matrix.build }}
|
||||
arguments: >
|
||||
${{ matrix.build }}
|
||||
-Pcompose.desktop.mac.sign=true
|
||||
-Pcompose.desktop.mac.signing.identity="${{ secrets.APPLE_IDENTITY }}"
|
||||
-Pcompose.desktop.mac.notarization.appleID="${{ secrets.APPLE_ID }}"
|
||||
-Pcompose.desktop.mac.notarization.password="${{ secrets.APPLE_PASSWORD }}"
|
||||
wrapper-cache-enabled: true
|
||||
dependencies-cache-enabled: true
|
||||
configuration-cache-enabled: true
|
||||
|
||||
@@ -38,9 +38,10 @@ private fun Task.onlyIfSigning(project: Project) {
|
||||
&& !File(rootDir, "src/main/resources/Tachidesk.jar").exists()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun Project.getSigningIdentity() = "${properties["compose.desktop.mac.signing.identity"]}".trim('"')
|
||||
|
||||
private fun isSigning(properties: Map<String, Any?>) = properties["compose.desktop.mac.sign"].toString() == "true"
|
||||
|
||||
private fun Project.tmpDir() = File(rootDir, "tmp")
|
||||
@@ -159,11 +160,13 @@ fun TaskContainerScope.registerTachideskTasks(project: Project) {
|
||||
exec {
|
||||
commandLine(
|
||||
"codesign",
|
||||
"-vvvv",
|
||||
"--deep",
|
||||
"-vvv",
|
||||
"-f",
|
||||
"--sign",
|
||||
properties["compose.desktop.mac.signing.identity"],
|
||||
"--timestamp",
|
||||
"--options", "runtime",
|
||||
"--force",
|
||||
"--prefix", "ca.gosyer.",
|
||||
"--sign", "Developer ID Application: ${getSigningIdentity()}",
|
||||
it.absolutePath
|
||||
)
|
||||
}
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package ca.gosyer.data.server
|
||||
|
||||
import ca.gosyer.common.prefs.Preference
|
||||
@@ -11,8 +17,7 @@ import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.SharingStarted
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.map
|
||||
import kotlinx.coroutines.flow.merge
|
||||
import kotlinx.coroutines.flow.combine
|
||||
import kotlinx.coroutines.flow.stateIn
|
||||
|
||||
class ServerUrlPreference(
|
||||
@@ -48,8 +53,9 @@ class ServerUrlPreference(
|
||||
}
|
||||
|
||||
override fun changes(): Flow<String> {
|
||||
return merge(server.changes(), port.changes())
|
||||
.map { get() }
|
||||
return combine(server.changes(), port.changes()) { server, port ->
|
||||
"$server:$port"
|
||||
}
|
||||
}
|
||||
|
||||
override fun stateIn(scope: CoroutineScope): StateFlow<String> {
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package ca.gosyer.ui.reader
|
||||
|
||||
import androidx.compose.desktop.AppWindow
|
||||
@@ -268,14 +274,14 @@ fun ChapterSeperator(
|
||||
}
|
||||
}
|
||||
|
||||
fun NavigationMode.toNavigation() = when (this) {
|
||||
private fun NavigationMode.toNavigation() = when (this) {
|
||||
NavigationMode.RightAndLeftNavigation -> RightAndLeftNavigation()
|
||||
NavigationMode.KindlishNavigation -> KindlishNavigation()
|
||||
NavigationMode.LNavigation -> LNavigation()
|
||||
NavigationMode.EdgeNavigation -> EdgeNavigation()
|
||||
}
|
||||
|
||||
fun ImageScale.toContentScale() = when (this) {
|
||||
private fun ImageScale.toContentScale() = when (this) {
|
||||
ImageScale.FitScreen -> ContentScale.Inside
|
||||
ImageScale.FitHeight -> ContentScale.FillHeight
|
||||
ImageScale.FitWidth -> ContentScale.FillWidth
|
||||
|
||||
@@ -135,7 +135,7 @@ fun ContinuousReader(
|
||||
}
|
||||
}
|
||||
|
||||
fun LazyListScope.items(
|
||||
private fun LazyListScope.items(
|
||||
pages: List<ReaderPage>,
|
||||
paddingValues: PaddingValues,
|
||||
previousChapter: ReaderChapter?,
|
||||
|
||||
Reference in New Issue
Block a user