add: 手机app源码
This commit is contained in:
1 parent
2311802ae4
commit
a46b487409
14 files changed
+2906
No files matched your search
@@ -0,0 +1,6 @@
|
|||||||
|
.gradle/
|
||||||
|
build/
|
||||||
|
local.properties
|
||||||
|
.idea/
|
||||||
|
*.iml
|
||||||
|
app/build/
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
FallGuard project status
|
||||||
|
|
||||||
|
Source project: created.
|
||||||
|
Local APK build: NOT run in this environment because Android SDK / Gradle are not installed and outbound DNS/network access is unavailable.
|
||||||
|
APK build workflow: .github/workflows/android.yml
|
||||||
|
Expected debug APK output after a successful build: app/build/outputs/apk/debug/app-debug.apk
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
id("org.jetbrains.kotlin.android")
|
||||||
|
id("org.jetbrains.kotlin.plugin.compose")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "com.zhouyi.elife"
|
||||||
|
compileSdk = 35
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = "com.zhouyi.elife"
|
||||||
|
minSdk = 24
|
||||||
|
targetSdk = 35
|
||||||
|
versionCode = 2
|
||||||
|
versionName = "1.1.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
debug {
|
||||||
|
// Keep the requested package name com.zhouyi.elife even for debug APK.
|
||||||
|
versionNameSuffix = "-debug"
|
||||||
|
}
|
||||||
|
release {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
proguardFiles(
|
||||||
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
|
"proguard-rules.pro"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
compose = true
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "17"
|
||||||
|
}
|
||||||
|
packaging {
|
||||||
|
resources {
|
||||||
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
val composeBom = platform("androidx.compose:compose-bom:2024.12.01")
|
||||||
|
implementation(composeBom)
|
||||||
|
androidTestImplementation(composeBom)
|
||||||
|
|
||||||
|
implementation("androidx.core:core-ktx:1.15.0")
|
||||||
|
implementation("androidx.activity:activity-compose:1.10.0")
|
||||||
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7")
|
||||||
|
implementation("androidx.compose.ui:ui")
|
||||||
|
implementation("androidx.compose.ui:ui-graphics")
|
||||||
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
||||||
|
implementation("androidx.compose.material3:material3")
|
||||||
|
implementation("androidx.compose.material:material-icons-extended")
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
|
||||||
|
|
||||||
|
debugImplementation("androidx.compose.ui:ui-tooling")
|
||||||
|
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
||||||
|
androidTestImplementation("androidx.test.ext:junit:1.2.1")
|
||||||
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
|
||||||
|
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
|
||||||
|
}
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
# No custom ProGuard rules are required for the current app.
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:allowBackup="true"
|
||||||
|
android:icon="@drawable/ic_launcher"
|
||||||
|
android:label="智能生活"
|
||||||
|
android:supportsRtl="true"
|
||||||
|
android:theme="@style/Theme.SmartLife"
|
||||||
|
android:usesCleartextTraffic="true">
|
||||||
|
<activity
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:screenOrientation="portrait">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
</application>
|
||||||
|
</manifest>
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,8 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="48dp" android:height="48dp"
|
||||||
|
android:viewportWidth="48" android:viewportHeight="48">
|
||||||
|
<path android:fillColor="#536DFE" android:pathData="M5,22L24,5 43,22 39,26 24,13 9,26z" />
|
||||||
|
<path android:fillColor="#536DFE" android:pathData="M10,23 L38,23 L38,42 L10,42 Z" />
|
||||||
|
<path android:fillColor="#FFFFFF" android:pathData="M20,29L28,29L28,42L20,42Z" />
|
||||||
|
<path android:fillColor="#B8C5FF" android:pathData="M14,28L18,28L18,32L14,32Z M30,28L34,28L34,32L30,32Z" />
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<style name="Theme.SmartLife" parent="android:style/Theme.Material.Light.NoActionBar">
|
||||||
|
<item name="android:fontFamily">sans</item>
|
||||||
|
<item name="android:colorAccent">#536DFE</item>
|
||||||
|
<item name="android:statusBarColor">#F3F6FC</item>
|
||||||
|
<item name="android:navigationBarColor">#F3F6FC</item>
|
||||||
|
<item name="android:windowLightStatusBar">true</item>
|
||||||
|
<item name="android:windowActionModeOverlay">true</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
plugins {
|
||||||
|
id("com.android.application") version "8.7.3" apply false
|
||||||
|
id("org.jetbrains.kotlin.android") version "2.0.21" apply false
|
||||||
|
id("org.jetbrains.kotlin.plugin.compose") version "2.0.21" apply false
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8
|
||||||
|
android.useAndroidX=true
|
||||||
|
kotlin.code.style=official
|
||||||
|
org.gradle.parallel=true
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=manual-wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=manual-wrapper/dists
|
||||||
Vendored
+24
@@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Small wrapper bootstrap that downloads Gradle when it is not already cached.
|
||||||
|
set -euo pipefail
|
||||||
|
GRADLE_VERSION="8.9"
|
||||||
|
GRADLE_USER_HOME="${GRADLE_USER_HOME:-$HOME/.gradle}"
|
||||||
|
INSTALL_ROOT="$GRADLE_USER_HOME/manual-wrapper/gradle-$GRADLE_VERSION"
|
||||||
|
GRADLE_BIN="$INSTALL_ROOT/gradle-$GRADLE_VERSION/bin/gradle"
|
||||||
|
if [[ ! -x "$GRADLE_BIN" ]]; then
|
||||||
|
mkdir -p "$INSTALL_ROOT"
|
||||||
|
ARCHIVE="$INSTALL_ROOT/gradle-$GRADLE_VERSION-bin.zip"
|
||||||
|
URL="https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip"
|
||||||
|
echo "Gradle $GRADLE_VERSION 尚未安装,正在下载……"
|
||||||
|
if command -v curl >/dev/null 2>&1; then
|
||||||
|
curl --fail --location --retry 3 "$URL" --output "$ARCHIVE"
|
||||||
|
elif command -v wget >/dev/null 2>&1; then
|
||||||
|
wget -O "$ARCHIVE" "$URL"
|
||||||
|
else
|
||||||
|
echo "需要 curl 或 wget 才能下载 Gradle。" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
unzip -q -o "$ARCHIVE" -d "$INSTALL_ROOT"
|
||||||
|
rm -f "$ARCHIVE"
|
||||||
|
fi
|
||||||
|
exec "$GRADLE_BIN" "$@"
|
||||||
Vendored
+12
@@ -0,0 +1,12 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
set "GRADLE_VERSION=8.9"
|
||||||
|
set "INSTALL_ROOT=%USERPROFILE%\.gradle\manual-wrapper\gradle-%GRADLE_VERSION%"
|
||||||
|
set "GRADLE_BIN=%INSTALL_ROOT%\gradle-%GRADLE_VERSION%\bin\gradle.bat"
|
||||||
|
if not exist "%GRADLE_BIN%" (
|
||||||
|
echo Gradle %GRADLE_VERSION% 尚未安装,正在下载……
|
||||||
|
powershell -NoProfile -ExecutionPolicy Bypass -Command "$ErrorActionPreference='Stop'; $root='%INSTALL_ROOT%'; New-Item -ItemType Directory -Force -Path $root | Out-Null; $zip=Join-Path $root 'gradle-%GRADLE_VERSION%-bin.zip'; Invoke-WebRequest -Uri 'https://services.gradle.org/distributions/gradle-%GRADLE_VERSION%-bin.zip' -OutFile $zip; Expand-Archive -Path $zip -DestinationPath $root -Force; Remove-Item $zip -Force"
|
||||||
|
if errorlevel 1 exit /b 1
|
||||||
|
)
|
||||||
|
call "%GRADLE_BIN%" %*
|
||||||
|
exit /b %ERRORLEVEL%
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencyResolutionManagement {
|
||||||
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rootProject.name = "SmartLife"
|
||||||
|
include(":app")
|
||||||
Reference in new issue
Block a user