Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions demoApp/composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ kotlin {
}
}

listOf(
macosX64(),
macosArm64()
).forEach {
it.binaries.executable {
entryPoint = "main"
}
}

sourceSets {
commonMain.dependencies {
implementation(compose.runtime)
Expand Down Expand Up @@ -138,4 +147,12 @@ compose.desktop {
packageVersion = "1.0.0"
}
}
nativeApplication {
targets(kotlin.macosX64(), kotlin.macosArm64())
distributions {
targetFormats(TargetFormat.Dmg)
packageName = "sh.calvin.reorderable.demo"
packageVersion = "1.0.0"
}
}
}
23 changes: 23 additions & 0 deletions demoApp/composeApp/src/macosMain/kotlin/main.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import androidx.compose.ui.unit.DpSize
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Window
import platform.AppKit.NSApplication
import platform.AppKit.NSApplicationActivationPolicy
import platform.AppKit.NSApplicationDelegateProtocol
import platform.darwin.NSObject
import sh.calvin.reorderable.demo.ui.App

fun main() {
val nsApplication = NSApplication.sharedApplication()
nsApplication.setActivationPolicy(NSApplicationActivationPolicy.NSApplicationActivationPolicyRegular)
nsApplication.delegate = object : NSObject(), NSApplicationDelegateProtocol {
override fun applicationShouldTerminateAfterLastWindowClosed(sender: NSApplication) = true
}
Window(
title = "Reorderable",
size = DpSize(width = 800.dp, height = 600.dp)
) {
App()
}
nsApplication.run()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package sh.calvin.reorderable.demo

import androidx.compose.runtime.Composable

@Composable
actual fun rememberReorderHapticFeedback(): ReorderHapticFeedback {
return ReorderHapticFeedback()
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ signAllPublications=true

org.jetbrains.compose.experimental.wasm.enabled=true
org.jetbrains.compose.experimental.jscanvas.enabled=true
org.jetbrains.compose.experimental.macos.enabled=true
4 changes: 3 additions & 1 deletion reorderable/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ kotlin {
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
iosSimulatorArm64(),
macosX64(),
macosArm64()
).forEach {
it.binaries.framework {
baseName = "reorderable"
Expand Down
Loading