-
Notifications
You must be signed in to change notification settings - Fork 1
FEAT#1 크루위키 KMP 프로젝트 초기 세팅 및 자산 이관 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| *.iml | ||
| .kotlin | ||
| .gradle | ||
| **/build/ | ||
| xcuserdata | ||
| !src/**/build/ | ||
| local.properties | ||
| .idea | ||
| .DS_Store | ||
| captures | ||
| .externalNativeBuild | ||
| .cxx | ||
| *.xcodeproj/* | ||
| !*.xcodeproj/project.pbxproj | ||
| !*.xcodeproj/xcshareddata/ | ||
| !*.xcodeproj/project.xcworkspace/ | ||
| !*.xcworkspace/contents.xcworkspacedata | ||
| **/xcshareddata/WorkspaceSettings.xcsettings | ||
| node_modules/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,33 @@ | ||
| # android | ||
| 크루위키 안드로이드 앱입니다! | ||
| This is a Kotlin Multiplatform project targeting Android, iOS. | ||
|
|
||
| Asset migration notes for `crew-wiki-next` are in [./docs/asset-migration.md](./docs/asset-migration.md). | ||
|
|
||
| * [/iosApp](./iosApp/iosApp) contains an iOS application. Even if you’re sharing your UI with Compose Multiplatform, | ||
| you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project. | ||
|
|
||
| * [/shared](./shared/src) is for code that will be shared across your Compose Multiplatform applications. | ||
| It contains several subfolders: | ||
| - [commonMain](./shared/src/commonMain/kotlin) is for code that’s common for all targets. | ||
| - Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name. | ||
| For example, if you want to use Apple’s CoreCrypto for the iOS part of your Kotlin app, | ||
| the [iosMain](./shared/src/iosMain/kotlin) folder would be the right place for such calls. | ||
| Similarly, if you want to edit the Desktop (JVM) specific part, the [jvmMain](./shared/src/jvmMain/kotlin) | ||
| folder is the appropriate location. | ||
|
|
||
| ### Running the apps | ||
|
|
||
| Use the run configurations provided by the run widget in your IDE's toolbar. You can also use these commands and options: | ||
|
|
||
| - Android app: `./gradlew :androidApp:assembleDebug` | ||
| - iOS app: open the [/iosApp](./iosApp) directory in Xcode and run it from there. | ||
|
|
||
| ### Running tests | ||
|
|
||
| Use the run button in your IDE's editor gutter, or run tests using Gradle tasks: | ||
|
|
||
| - Android tests: `./gradlew :shared:testAndroidHostTest` | ||
| - iOS tests: `./gradlew :shared:iosSimulatorArm64Test` | ||
|
|
||
| --- | ||
|
|
||
| Learn more about [Kotlin Multiplatform](https://www.jetbrains.com/help/kotlin-multiplatform-dev/get-started.html)… |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
|
|
||
| plugins { | ||
| alias(libs.plugins.androidApplication) | ||
| alias(libs.plugins.composeMultiplatform) | ||
| alias(libs.plugins.composeCompiler) | ||
| } | ||
|
|
||
| kotlin { | ||
| compilerOptions { | ||
| jvmTarget = JvmTarget.JVM_11 | ||
| } | ||
| } | ||
|
Comment on lines
+9
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이유: 해결 방안: kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_17
}
} |
||
| dependencies { | ||
| implementation(projects.shared) | ||
|
|
||
| implementation(libs.androidx.activity.compose) | ||
|
|
||
| implementation(libs.compose.uiToolingPreview) | ||
| debugImplementation(libs.compose.uiTooling) | ||
| } | ||
|
|
||
| android { | ||
| namespace = "com.example.crew_wiki" | ||
| compileSdk = libs.versions.android.compileSdk.get().toInt() | ||
|
|
||
| defaultConfig { | ||
| applicationId = "com.example.crew_wiki" | ||
| minSdk = libs.versions.android.minSdk.get().toInt() | ||
| targetSdk = libs.versions.android.targetSdk.get().toInt() | ||
| versionCode = 1 | ||
| versionName = "1.0" | ||
| } | ||
| packaging { | ||
| resources { | ||
| excludes += "/META-INF/{AL2.0,LGPL2.1}" | ||
| } | ||
| } | ||
| buildTypes { | ||
| getByName("release") { | ||
| isMinifyEnabled = false | ||
| } | ||
| } | ||
| compileOptions { | ||
| sourceCompatibility = JavaVersion.VERSION_11 | ||
| targetCompatibility = JavaVersion.VERSION_11 | ||
| } | ||
|
Comment on lines
+44
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
|
||
| <application | ||
| android:allowBackup="true" | ||
| android:icon="@mipmap/ic_launcher" | ||
| android:label="@string/app_name" | ||
| android:roundIcon="@mipmap/ic_launcher_round" | ||
| android:supportsRtl="true" | ||
| android:theme="@android:style/Theme.Material.Light.NoActionBar"> | ||
| <activity | ||
| android:exported="true" | ||
| android:name=".MainActivity"> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.MAIN" /> | ||
|
|
||
| <category android:name="android.intent.category.LAUNCHER" /> | ||
| </intent-filter> | ||
| </activity> | ||
| </application> | ||
|
|
||
| </manifest> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package com.example.crew_wiki | ||
|
|
||
| import android.os.Bundle | ||
| import androidx.activity.ComponentActivity | ||
| import androidx.activity.compose.setContent | ||
| import androidx.activity.enableEdgeToEdge | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
|
|
||
| class MainActivity : ComponentActivity() { | ||
| override fun onCreate(savedInstanceState: Bundle?) { | ||
| enableEdgeToEdge() | ||
| super.onCreate(savedInstanceState) | ||
|
|
||
| setContent { | ||
| App() | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @Preview | ||
| @Composable | ||
| fun AppAndroidPreview() { | ||
| App() | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| xmlns:aapt="http://schemas.android.com/aapt" | ||
| android:width="108dp" | ||
| android:height="108dp" | ||
| android:viewportWidth="108" | ||
| android:viewportHeight="108"> | ||
| <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> | ||
| <aapt:attr name="android:fillColor"> | ||
| <gradient | ||
| android:endX="85.84757" | ||
| android:endY="92.4963" | ||
| android:startX="42.9492" | ||
| android:startY="49.59793" | ||
| android:type="linear"> | ||
| <item | ||
| android:color="#44000000" | ||
| android:offset="0.0" /> | ||
| <item | ||
| android:color="#00000000" | ||
| android:offset="1.0" /> | ||
| </gradient> | ||
| </aapt:attr> | ||
| </path> | ||
| <path | ||
| android:fillColor="#FFFFFF" | ||
| android:fillType="nonZero" | ||
| android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" | ||
| android:strokeWidth="1" | ||
| android:strokeColor="#00000000" /> | ||
| </vector> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,170 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="108dp" | ||
| android:height="108dp" | ||
| android:viewportWidth="108" | ||
| android:viewportHeight="108"> | ||
| <path | ||
| android:fillColor="#3DDC84" | ||
| android:pathData="M0,0h108v108h-108z" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M9,0L9,108" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M19,0L19,108" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M29,0L29,108" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M39,0L39,108" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M49,0L49,108" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M59,0L59,108" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M69,0L69,108" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M79,0L79,108" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M89,0L89,108" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M99,0L99,108" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M0,9L108,9" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M0,19L108,19" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M0,29L108,29" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M0,39L108,39" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M0,49L108,49" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M0,59L108,59" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M0,69L108,69" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M0,79L108,79" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M0,89L108,89" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M0,99L108,99" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M19,29L89,29" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M19,39L89,39" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M19,49L89,49" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M19,59L89,59" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M19,69L89,69" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M19,79L89,79" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M29,19L29,89" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M39,19L39,89" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M49,19L49,89" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M59,19L59,89" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M69,19L69,89" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| <path | ||
| android:fillColor="#00000000" | ||
| android:pathData="M79,19L79,89" | ||
| android:strokeWidth="0.8" | ||
| android:strokeColor="#33FFFFFF" /> | ||
| </vector> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <background android:drawable="@drawable/ic_launcher_background" /> | ||
| <foreground android:drawable="@drawable/ic_launcher_foreground" /> | ||
| </adaptive-icon> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <background android:drawable="@drawable/ic_launcher_background" /> | ||
| <foreground android:drawable="@drawable/ic_launcher_foreground" /> | ||
| </adaptive-icon> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <resources> | ||
| <string name="app_name">Crewwiki</string> | ||
| </resources> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| plugins { | ||
| // this is necessary to avoid the plugins to be loaded multiple times | ||
| // in each subproject's classloader | ||
| alias(libs.plugins.androidApplication) apply false | ||
| alias(libs.plugins.androidMultiplatformLibrary) apply false | ||
| alias(libs.plugins.composeMultiplatform) apply false | ||
| alias(libs.plugins.composeCompiler) apply false | ||
| alias(libs.plugins.kotlinMultiplatform) apply false | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이유:
현재
androidApp모듈의plugins블록에 Kotlin Android 플러그인(org.jetbrains.kotlin.android)이 누락되어 있습니다. 이로 인해MainActivity.kt와 같은 Kotlin 소스 코드가 정상적으로 컴파일되지 않거나,kotlin { ... }설정 블록을 인식하지 못해 빌드 에러가 발생할 수 있습니다.해결 방안:
libs.versions.toml에kotlinAndroid플러그인을 정의하고,androidApp/build.gradle.kts및 루트build.gradle.kts에 추가해 주세요.plugins { alias(libs.plugins.androidApplication) id("org.jetbrains.kotlin.android") alias(libs.plugins.composeMultiplatform) alias(libs.plugins.composeCompiler) }