diff --git a/Cargo.toml b/Cargo.toml index 0b0850d..89c1e4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -90,3 +90,24 @@ inherits = "dev" [profile.android-dev] inherits = "dev" + +[package.metadata.android] +package_name = "xyz.waozi.myquest" + +[package.metadata.bundle] +name = "myQuest" +identifier = "xyz.waozi.myquest" +version = "1.0.0" +copyright = "Copyright (c) 2024 waozixyz" +category = "Productivity" +short_description = "Personal life management and habit tracking application" +long_description = """ +myQuest is a comprehensive personal life management application focused on visualization and habit tracking. Features include: + +- Habit Tracker: Track daily habits with calendar view and visual progress tracking +- Weekly Todo List: Organize tasks by day with week-at-a-glance view +- Life Timeline: Visualize life journey and experiences on an interactive timeline +- Routine Manager (Coming Soon): Plan and optimize daily schedules with detailed time allocation + +Built with Rust and Dioxus, myQuest helps you build consistency, manage tasks, and gain perspective on your life journey. +""" diff --git a/metadata/android/AndroidManifest.xml b/metadata/android/AndroidManifest.xml index a4484c0..9b0f8a9 100644 --- a/metadata/android/AndroidManifest.xml +++ b/metadata/android/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/metadata/android/MainActivity.kt b/metadata/android/MainActivity.kt new file mode 100644 index 0000000..3fce90e --- /dev/null +++ b/metadata/android/MainActivity.kt @@ -0,0 +1,8 @@ +package dev.dioxus.main; + +// need to re-export buildconfig down from the parent +import xyz.waozi.myQuest.BuildConfig; +typealias BuildConfig = BuildConfig; + + +class MainActivity : WryActivity() diff --git a/metadata/android/build.gradle.kts b/metadata/android/build.gradle.kts new file mode 100644 index 0000000..37231d9 --- /dev/null +++ b/metadata/android/build.gradle.kts @@ -0,0 +1,64 @@ +plugins { + id("com.android.application") + id("org.jetbrains.kotlin.android") +} + +android { + namespace = "xyz.waozi.myQuest" + compileSdk = 34 + + defaultConfig { + applicationId = "xyz.waozi.myQuest" + minSdk = 24 + targetSdk = 34 + versionCode = 1 + versionName = "1.0" + } + + buildTypes { + debug { + isDebuggable = true + isJniDebuggable = true + isMinifyEnabled = false + packaging { + jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so") + jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so") + jniLibs.keepDebugSymbols.add("*/x86/*.so") + jniLibs.keepDebugSymbols.add("*/x86_64/*.so") + } + } + release { + isMinifyEnabled = true + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = "1.8" + } + + buildFeatures { + buildConfig = true + } + + sourceSets { + getByName("main") { + java.srcDirs("src/main/kotlin") + } + } +} + +dependencies { + implementation("androidx.webkit:webkit:1.8.0") + implementation("androidx.appcompat:appcompat:1.6.1") + implementation("com.google.android.material:material:1.11.0") + implementation("androidx.core:core-ktx:1.12.0") +} \ No newline at end of file diff --git a/metadata/android/res/values/colors.xml b/metadata/android/res/values/colors.xml index d2cd14a..36105cc 100644 --- a/metadata/android/res/values/colors.xml +++ b/metadata/android/res/values/colors.xml @@ -1,6 +1,23 @@ - #008577 - #00574B - #D81B60 + + #942f4a + #2d1a2c + #ff6b97 + + + #1a0f1f + #4a2639 + #e6dde9 + + + #4caf50 + #ff9800 + #f44336 + #2196f3 + + + #2d1f33 + #4a3655 + #241a28 \ No newline at end of file diff --git a/update_android_resources.sh b/update_android_resources.sh index 1d45e59..aa0b865 100755 --- a/update_android_resources.sh +++ b/update_android_resources.sh @@ -1,21 +1,27 @@ #!/bin/bash - # Source directories METADATA_DIR="metadata/android" MANIFEST_SOURCE="$METADATA_DIR/AndroidManifest.xml" RES_SOURCE="$METADATA_DIR/res" +GRADLE_SOURCE="$METADATA_DIR/build.gradle.kts" +ACTIVITY_SOURCE="$METADATA_DIR/MainActivity.kt" # Target directories -DEBUG_DIR="target/dx/myquest/debug/android/app/app/src/main" RELEASE_DIR="target/dx/myquest/release/android/app/app/src/main" +RELEASE_GRADLE="target/dx/myquest/release/android/app/app" +KOTLIN_TARGET="$RELEASE_DIR/kotlin/dev/dioxus/main" # Function to copy files copy_android_resources() { local target_dir="$1" - + local gradle_dir="$2" + local kotlin_target="$3" + # Create directories if they don't exist mkdir -p "$target_dir" - + mkdir -p "$gradle_dir" + mkdir -p "$kotlin_target" + # Copy AndroidManifest.xml if [ -f "$MANIFEST_SOURCE" ]; then cp "$MANIFEST_SOURCE" "$target_dir/AndroidManifest.xml" @@ -24,10 +30,9 @@ copy_android_resources() { echo "Error: Source AndroidManifest.xml not found at $MANIFEST_SOURCE" exit 1 fi - + # Copy res directory if [ -d "$RES_SOURCE" ]; then - # Remove existing res directory if it exists rm -rf "$target_dir/res" cp -r "$RES_SOURCE" "$target_dir/" echo "Copied res folder to $target_dir" @@ -35,12 +40,26 @@ copy_android_resources() { echo "Error: Source res directory not found at $RES_SOURCE" exit 1 fi -} -# Copy to debug directory -copy_android_resources "$DEBUG_DIR" + # Copy build.gradle.kts + if [ -f "$GRADLE_SOURCE" ]; then + cp "$GRADLE_SOURCE" "$gradle_dir/build.gradle.kts" + echo "Copied build.gradle.kts to $gradle_dir" + else + echo "Error: Source build.gradle.kts not found at $GRADLE_SOURCE" + exit 1 + fi + + # Copy MainActivity.kt + if [ -f "$ACTIVITY_SOURCE" ]; then + cp "$ACTIVITY_SOURCE" "$kotlin_target/MainActivity.kt" + echo "Copied MainActivity.kt to $kotlin_target" + else + echo "Error: Source MainActivity.kt not found at $ACTIVITY_SOURCE" + exit 1 + fi +} # Copy to release directory -copy_android_resources "$RELEASE_DIR" - -echo "Resource copy completed successfully!" +copy_android_resources "$RELEASE_DIR" "$RELEASE_GRADLE" "$KOTLIN_TARGET" +echo "Resource copy completed successfully!" \ No newline at end of file