Skip to content

Commit baa1167

Browse files
linroidclaude
andauthored
Rename examples/ to app/ and cli/ for production app structure (#42)
* Rename examples/ to app/ and cli/ for production app structure - examples/app -> app/shared, examples/androidApp -> app/android, examples/desktopApp -> app/desktop, examples/webApp -> app/web, examples/iosApp -> app/ios, examples/cli -> cli - Rename packages: com.linroid.kdown.examples -> com.linroid.kdown.app (cli uses com.linroid.kdown.cli) - Update Gradle module names, namespaces, applicationId, and iOS framework name (ExamplesApp -> KDownApp) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Update Android minSdk to 26 * Add iOS Xcode project file for app/ios Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Remove nested iosApp directory, move Swift sources to app/ios/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Rename iOS Xcode project from iosApp to KDown Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Update XCode project file * Link sqlite3 system library for iOS build Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix iOS bundle ID and development team Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Change Android namespace to com.linroid.kdown.android Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Update packages for app * Enable CADisableMinimumFrameDurationOnPhone for iOS Required by Compose Multiplatform for ProMotion display support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add CADisableMinimumFrameDurationOnPhone * Revert "Enable CADisableMinimumFrameDurationOnPhone for iOS" This reverts commit d8dd017. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ca1c9db commit baa1167

31 files changed

Lines changed: 1060 additions & 55 deletions

File tree

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ plugins {
44
}
55

66
android {
7-
namespace = "com.linroid.kdown.examples.android"
7+
namespace = "com.linroid.kdown.android"
88
compileSdk = libs.versions.android.compileSdk.get().toInt()
99

1010
defaultConfig {
11-
applicationId = "com.linroid.kdown.examples.android"
11+
applicationId = "com.linroid.kdown.app"
1212
minSdk = libs.versions.android.minSdk.get().toInt()
1313
targetSdk = libs.versions.android.targetSdk.get().toInt()
1414
versionCode = 1
@@ -35,10 +35,16 @@ android {
3535
buildFeatures {
3636
compose = true
3737
}
38+
39+
packaging {
40+
resources {
41+
excludes += "/META-INF/{INDEX.LIST,io.netty.versions.properties}"
42+
}
43+
}
3844
}
3945

4046
dependencies {
41-
implementation(projects.examples.app)
47+
implementation(projects.app.shared)
4248
implementation(projects.library.sqlite)
4349
implementation(projects.server)
4450
implementation(libs.androidx.activity.compose)

examples/androidApp/src/main/AndroidManifest.xml renamed to app/android/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
android:supportsRtl="true"
1010
android:theme="@android:style/Theme.Material.Light.NoActionBar">
1111
<activity
12-
android:name="com.linroid.kdown.examples.MainActivity"
12+
android:name="com.linroid.kdown.android.MainActivity"
1313
android:exported="true">
1414
<intent-filter>
1515
<action android:name="android.intent.action.MAIN" />

examples/androidApp/src/main/kotlin/com/linroid/kdown/examples/MainActivity.kt renamed to app/android/src/main/kotlin/com/linroid/kdown/android/MainActivity.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
package com.linroid.kdown.examples
1+
package com.linroid.kdown.android
22

33
import android.os.Bundle
44
import androidx.activity.ComponentActivity
55
import androidx.activity.compose.setContent
66
import androidx.activity.enableEdgeToEdge
77
import androidx.compose.runtime.DisposableEffect
88
import androidx.compose.runtime.remember
9-
import com.linroid.kdown.examples.backend.BackendFactory
10-
import com.linroid.kdown.examples.backend.BackendManager
11-
import com.linroid.kdown.examples.backend.LocalServerHandle
9+
import com.linroid.kdown.app.App
10+
import com.linroid.kdown.app.backend.BackendFactory
11+
import com.linroid.kdown.app.backend.BackendManager
12+
import com.linroid.kdown.app.backend.LocalServerHandle
1213
import com.linroid.kdown.server.KDownServer
1314
import com.linroid.kdown.server.KDownServerConfig
1415
import com.linroid.kdown.sqlite.DriverFactory
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
}
88

99
dependencies {
10-
implementation(projects.examples.app)
10+
implementation(projects.app.shared)
1111
implementation(projects.server)
1212
implementation(projects.library.ktor)
1313
implementation(projects.library.sqlite)
@@ -17,11 +17,11 @@ dependencies {
1717

1818
compose.desktop {
1919
application {
20-
mainClass = "com.linroid.kdown.examples.MainKt"
20+
mainClass = "com.linroid.kdown.app.MainKt"
2121

2222
nativeDistributions {
2323
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
24-
packageName = "KDown Examples"
24+
packageName = "KDown"
2525
packageVersion = "1.0.0"
2626
}
2727
}

examples/desktopApp/src/main/kotlin/com/linroid/kdown/examples/main.kt renamed to app/desktop/src/main/kotlin/com/linroid/kdown/desktop/main.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
package com.linroid.kdown.examples
1+
package com.linroid.kdown.desktop
22

33
import androidx.compose.runtime.DisposableEffect
44
import androidx.compose.runtime.remember
55
import androidx.compose.ui.window.Window
66
import androidx.compose.ui.window.application
7-
import com.linroid.kdown.examples.backend.BackendFactory
8-
import com.linroid.kdown.examples.backend.BackendManager
9-
import com.linroid.kdown.examples.backend.LocalServerHandle
7+
import com.linroid.kdown.app.App
8+
import com.linroid.kdown.app.backend.BackendFactory
9+
import com.linroid.kdown.app.backend.BackendManager
10+
import com.linroid.kdown.app.backend.LocalServerHandle
1011
import com.linroid.kdown.server.KDownServer
1112
import com.linroid.kdown.server.KDownServerConfig
1213
import com.linroid.kdown.sqlite.DriverFactory
@@ -42,7 +43,7 @@ fun main() = application {
4243
}
4344
Window(
4445
onCloseRequest = ::exitApplication,
45-
title = "KDown Examples"
46+
title = "KDown"
4647
) {
4748
App(backendManager)
4849
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import UIKit
22
import SwiftUI
3-
import ExamplesApp
3+
import KDownApp
44

55
struct ComposeView: UIViewControllerRepresentable {
66
func makeUIViewController(context: Context) -> UIViewController {

app/ios/KDown-Info.plist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CADisableMinimumFrameDurationOnPhone</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)