diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..6a5e0bd --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,38 @@ +plugins { + alias(libs.plugins.mcl.android.application.compose) + alias(libs.plugins.mcl.android.hilt) +} + +android { + namespace = "com.mingyuan.android_client" + defaultConfig { + applicationId = "com.mingyuan.android_client" + versionCode = 1 + versionName = "1.0" + } +} + +dependencies { + implementation(project(":core:designsystem")) + implementation(project(":core:ui")) + implementation(project(":core:data")) + + implementation(project(":feature:auth")) + implementation(project(":feature:checkin")) + implementation(project(":feature:plan")) + implementation(project(":feature:course")) + implementation(project(":feature:survey")) + implementation(project(":feature:feedback")) + implementation(project(":feature:profile")) + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.lifecycle.runtime.ktx) + implementation(libs.androidx.navigation.compose) + + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) + androidTestImplementation(libs.androidx.compose.ui.test.junit4) + debugImplementation(libs.androidx.compose.ui.test.manifest) +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..0966fff --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/app/src/main/java/com/mingyuan/android_client/AppNavHost.kt b/app/src/main/java/com/mingyuan/android_client/AppNavHost.kt new file mode 100644 index 0000000..06e5798 --- /dev/null +++ b/app/src/main/java/com/mingyuan/android_client/AppNavHost.kt @@ -0,0 +1,41 @@ +package com.mingyuan.android_client + +import androidx.compose.runtime.Composable +import androidx.navigation.compose.NavHost +import androidx.navigation.compose.composable +import androidx.navigation.compose.rememberNavController +import com.mingyuan.android_client.feature.auth.AUTH_ROUTE +import com.mingyuan.android_client.feature.auth.AuthScreen +import com.mingyuan.android_client.feature.checkin.CHECKIN_ROUTE +import com.mingyuan.android_client.feature.checkin.CheckinScreen +import com.mingyuan.android_client.feature.course.COURSE_ROUTE +import com.mingyuan.android_client.feature.course.CourseScreen +import com.mingyuan.android_client.feature.feedback.FEEDBACK_ROUTE +import com.mingyuan.android_client.feature.feedback.FeedbackScreen +import com.mingyuan.android_client.feature.plan.PLAN_ROUTE +import com.mingyuan.android_client.feature.plan.PlanScreen +import com.mingyuan.android_client.feature.profile.PROFILE_ROUTE +import com.mingyuan.android_client.feature.profile.ProfileScreen +import com.mingyuan.android_client.feature.survey.SURVEY_ROUTE +import com.mingyuan.android_client.feature.survey.SurveyScreen + +/** + * The single navigation graph for the app. Each feature exposes its own route constant and + * screen composable; this host wires them together (see docs/architecture.md). + */ +@Composable +fun AppNavHost() { + val navController = rememberNavController() + NavHost( + navController = navController, + startDestination = CHECKIN_ROUTE, + ) { + composable(AUTH_ROUTE) { AuthScreen() } + composable(CHECKIN_ROUTE) { CheckinScreen() } + composable(PLAN_ROUTE) { PlanScreen() } + composable(COURSE_ROUTE) { CourseScreen() } + composable(SURVEY_ROUTE) { SurveyScreen() } + composable(FEEDBACK_ROUTE) { FeedbackScreen() } + composable(PROFILE_ROUTE) { ProfileScreen() } + } +} diff --git a/app/src/main/java/com/mingyuan/android_client/MainActivity.kt b/app/src/main/java/com/mingyuan/android_client/MainActivity.kt new file mode 100644 index 0000000..8c023a7 --- /dev/null +++ b/app/src/main/java/com/mingyuan/android_client/MainActivity.kt @@ -0,0 +1,19 @@ +package com.mingyuan.android_client + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge +import com.mingyuan.android_client.core.designsystem.theme.MingyuanTheme + +class MainActivity : ComponentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + enableEdgeToEdge() + setContent { + MingyuanTheme { + AppNavHost() + } + } + } +} diff --git a/app/src/main/java/com/mingyuan/android_client/MingyuanApplication.kt b/app/src/main/java/com/mingyuan/android_client/MingyuanApplication.kt new file mode 100644 index 0000000..5d958a1 --- /dev/null +++ b/app/src/main/java/com/mingyuan/android_client/MingyuanApplication.kt @@ -0,0 +1,7 @@ +package com.mingyuan.android_client + +import android.app.Application +import dagger.hilt.android.HiltAndroidApp + +@HiltAndroidApp +class MingyuanApplication : Application() diff --git a/app/src/main/keepRules/rules.keep b/app/src/main/keepRules/rules.keep new file mode 100644 index 0000000..d7e081a --- /dev/null +++ b/app/src/main/keepRules/rules.keep @@ -0,0 +1,12 @@ +# Add project specific R8 rules here. +# AGP will combine all keep rule files in src/main/keepRules to pass to R8 +# +# For more details, see +# https://d.android.com/r/tools/r8/keep-rules + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher.xml b/app/src/main/res/mipmap-anydpi/ic_launcher.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000..c209e78 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000..b2dfe3d Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000..4f0f1d6 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000..62b611d Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000..948a307 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..1b9a695 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000..28d4b77 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9287f50 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000..aa7d642 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9126ae3 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..f8c6127 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..4588faf --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + 明缘进阶场 + diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml new file mode 100644 index 0000000..d0d9e4b --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,5 @@ + + + +