跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
最近更改
随机页面
MediaWiki帮助
中医经典
阴阳五行
黄帝内经
神农本草经
MyWiki
搜索
搜索
外观
创建账号
登录
个人工具
创建账号
登录
未登录编辑者的页面
了解详情
贡献
讨论
编辑“︁
Android 构建环境报告
”︁(章节)
页面
讨论
大陆简体
阅读
编辑
编辑源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
编辑
编辑源代码
查看历史
常规
链入页面
相关更改
特殊页面
页面信息
外观
移至侧栏
隐藏
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
=== 构建环境配置 === ==== 1. Gradle 版本信息 ==== '''Gradle 包装器版本:''' 8.2 '''Gradle 插件版本:''' 8.2.0 '''Kotlin 语言版本:''' 1.9.10 '''文件位置:''' <code>/root/.openclaw/workspace/mediawiki-app/gradle/wrapper/gradle-wrapper.properties</code> <syntaxhighlight lang="properties">distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists </syntaxhighlight> --- ==== 2. 编译配置 ==== '''编译 SDK 版本:''' 34 '''最小 SDK 版本:''' 24 '''目标 SDK 版本:''' 34 '''Java 编译配置:''' * 源兼容性:Java 17 * 目标兼容性:Java 17 * Kotlin JVM 目标:17 '''文件位置:''' <code>/root/.openclaw/workspace/mediawiki-app/app/build.gradle</code> --- ==== 3. 项目依赖 ==== ===== 核心依赖库 ===== ! 库名称 版本 ! 用途 !--------------!------ ! androidx.core:core-ktx 1.12.0 ! Android 核心功能扩展 ! androidx.lifecycle:lifecycle-runtime-ktx 2.7.0 ! 生命周期管理 ! androidx.activity:activity-compose 1.8.2 ! Compose 活动支持 ! androidx.compose:compose-bom 2023.10.01 ! Jetpack Compose 依赖管理 ! androidx.compose.ui:ui - ! Compose UI 基础 ! androidx.compose.ui:ui-graphics - ! Compose 图形支持 ! androidx.compose.ui:ui-tooling-preview - ! 预览工具 ! androidx.compose.material3:material3 - ! Material Design 3 组件 ! com.google.android.material:material 1.11.0 ! Material 组件库 ! androidx.appcompat:appcompat 1.6.1 ! 应用兼容支持 ===== 网络与数据处理 ===== ! 库名称 版本 ! 用途 !--------------!------ ! com.squareup.retrofit2:retrofit 2.9.0 ! HTTP 客户端库 ! com.squareup.retrofit2:converter-gson 2.9.0 ! JSON 序列化/反序列化 ! com.squareup.okhttp3:okhttp 4.12.0 ! HTTP 请求库 ! com.squareup.okhttp3:logging-interceptor 4.12.0 ! 请求日志拦截器 ===== 异步处理与协程 ===== ! 库名称 版本 ! 用途 !--------------!------ ! org.jetbrains.kotlinx:kotlinx-coroutines-core 1.7.3 ! Kotlin 协程核心库 ! org.jetbrains.kotlinx:kotlinx-coroutines-android 1.7.3 ! Android 平台协程支持 ===== 数据库 ===== ! 库名称 版本 ! 用途 !--------------!------ ! androidx.room:room-runtime 2.6.1 ! Room 数据库运行时 ! androidx.room:room-ktx 2.6.1 ! Room Kotlin 扩展 ! androidx.room:room-compiler 2.6.1 ! Room 编译时注解处理 ===== UI 与图片加载 ===== ! 库名称 版本 ! 用途 !--------------!------ ! io.coil-kt:coil-compose 2.4.0 ! Compose 图片加载库 ! androidx.compose.material:material-icons-extended 1.6.3 ! Material 图标库 ! androidx.constraintlayout:constraintlayout-compose 1.0.1 ! 约束布局支持 ===== 导航 ===== ! 库名称 版本 ! 用途 !--------------!------ ! androidx.navigation:navigation-compose 2.7.5 ! Compose 导航组件 --- ==== 4. 项目架构 ==== ===== 应用包名:'''com.chsoc.mediawiki''' ===== ===== 项目版本信息: ===== * 版本代码:1 * 版本名称:1.0.0 ===== 项目结构: ===== <syntaxhighlight >mediawiki-app/ ├── app/ │ ├── src/ │ │ └── main/ │ │ └── java/ │ │ └── com/ │ │ └── chsoc/ │ │ └── mediawiki/ │ │ ├── data/ │ │ │ ├── local/ │ │ │ │ ├── dao/ │ │ │ │ ├── database/ │ │ │ │ ├── entity/ │ │ │ │ └── converter/ │ │ │ ├── remote/ │ │ │ └── repository/ │ │ ├── ui/ │ │ │ ├── screen/ │ │ │ └── component/ │ │ └── viewmodel/ │ └── build.gradle </syntaxhighlight> --- ==== 5. 构建类型 ==== ===== 发布构建配置: ===== <syntaxhighlight lang="gradle">buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } </syntaxhighlight> * 混淆已禁用 * 使用默认 ProGuard 配置 --- ==== 6. 代码优化与编译器选项 ==== '''Kotlin 编译器选项:''' <syntaxhighlight lang="gradle">kotlinOptions { jvmTarget = '17' freeCompilerArgs += "-opt-in=androidx.compose.material3.ExperimentalMaterial3Api" } </syntaxhighlight> '''Compose 编译器:''' <syntaxhighlight lang="gradle">composeOptions { kotlinCompilerExtensionVersion '1.5.3' } </syntaxhighlight> --- ==== 7. 资源打包配置 ==== <syntaxhighlight lang="gradle">packaging { resources { excludes += '/META-INF/{AL2.0,LGPL2.1}' } } </syntaxhighlight> 排除了特定的许可证资源文件。 ---
摘要:
请注意,所有对MyWiki的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
MyWiki:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)