Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
F
flutter_clx_base
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
flutter_clx_base
Commits
f8725b1c
提交
f8725b1c
authored
2月 02, 2026
作者:
史晓晨
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
升级gradle
上级
72c27baf
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
113 行增加
和
132 行删除
+113
-132
build.gradle
example/android/app/build.gradle
+0
-67
build.gradle.kts
example/android/app/build.gradle.kts
+44
-0
AndroidManifest.xml
example/android/app/src/debug/AndroidManifest.xml
+2
-3
AndroidManifest.xml
example/android/app/src/main/AndroidManifest.xml
+12
-14
AndroidManifest.xml
example/android/app/src/profile/AndroidManifest.xml
+2
-3
build.gradle
example/android/build.gradle
+0
-31
build.gradle.kts
example/android/build.gradle.kts
+24
-0
gradle.properties
example/android/gradle.properties
+1
-1
gradle-wrapper.properties
example/android/gradle/wrapper/gradle-wrapper.properties
+2
-2
settings.gradle
example/android/settings.gradle
+0
-11
settings.gradle.kts
example/android/settings.gradle.kts
+26
-0
没有找到文件。
example/android/app/build.gradle
deleted
100644 → 0
浏览文件 @
72c27baf
def
localProperties
=
new
Properties
()
def
localPropertiesFile
=
rootProject
.
file
(
'local.properties'
)
if
(
localPropertiesFile
.
exists
())
{
localPropertiesFile
.
withReader
(
'UTF-8'
)
{
reader
->
localProperties
.
load
(
reader
)
}
}
def
flutterRoot
=
localProperties
.
getProperty
(
'flutter.sdk'
)
if
(
flutterRoot
==
null
)
{
throw
new
GradleException
(
"Flutter SDK not found. Define location with flutter.sdk in the local.properties file."
)
}
def
flutterVersionCode
=
localProperties
.
getProperty
(
'flutter.versionCode'
)
if
(
flutterVersionCode
==
null
)
{
flutterVersionCode
=
'1'
}
def
flutterVersionName
=
localProperties
.
getProperty
(
'flutter.versionName'
)
if
(
flutterVersionName
==
null
)
{
flutterVersionName
=
'1.0'
}
apply
plugin:
'com.android.application'
apply
plugin:
'kotlin-android'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
compileSdkVersion
34
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_11
targetCompatibility
JavaVersion
.
VERSION_11
}
sourceSets
{
main
.
java
.
srcDirs
+=
'src/main/kotlin'
}
defaultConfig
{
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"com.clx.flutterBase"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion
21
targetSdkVersion
31
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
}
buildTypes
{
release
{
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig
signingConfigs
.
debug
}
}
}
flutter
{
source
'../..'
}
dependencies
{
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}
example/android/app/build.gradle.kts
0 → 100644
浏览文件 @
f8725b1c
plugins {
id("com.android.application")
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
android {
namespace = "com.example.example"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.clx.flutterBase"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug")
}
}
}
flutter {
source = "../.."
}
example/android/app/src/debug/AndroidManifest.xml
浏览文件 @
f8725b1c
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.example.example"
>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
</manifest>
example/android/app/src/main/AndroidManifest.xml
浏览文件 @
f8725b1c
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.example.example"
>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.CAMERA"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.CAMERA"
/>
<application
android:label=
"example"
<application
android:name=
"${applicationName}"
android:icon=
"@mipmap/ic_launcher"
>
android:icon=
"@mipmap/ic_launcher"
android:label=
"example"
>
<activity
android:name=
".MainActivity"
android:configChanges=
"orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:exported=
"true"
android:hardwareAccelerated=
"true"
android:launchMode=
"singleTop"
android:theme=
"@style/LaunchTheme"
android:configChanges=
"orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated=
"true"
android:windowSoftInputMode=
"adjustResize"
>
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name=
"io.flutter.embedding.android.NormalTheme"
android:resource=
"@style/NormalTheme"
/>
android:name=
"io.flutter.embedding.android.NormalTheme"
android:resource=
"@style/NormalTheme"
/>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
...
...
example/android/app/src/profile/AndroidManifest.xml
浏览文件 @
f8725b1c
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.example.example"
>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
</manifest>
example/android/build.gradle
deleted
100644 → 0
浏览文件 @
72c27baf
buildscript
{
ext
.
kotlin_version
=
'1.7.10'
repositories
{
google
()
mavenCentral
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:7.3.0'
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects
{
repositories
{
google
()
mavenCentral
()
}
}
rootProject
.
buildDir
=
'../build'
subprojects
{
project
.
buildDir
=
"${rootProject.buildDir}/${project.name}"
}
subprojects
{
project
.
evaluationDependsOn
(
':app'
)
}
tasks
.
register
(
"clean"
,
Delete
)
{
delete
rootProject
.
buildDir
}
example/android/build.gradle.kts
0 → 100644
浏览文件 @
f8725b1c
allprojects {
repositories {
google()
mavenCentral()
}
}
val newBuildDir: Directory =
rootProject.layout.buildDirectory
.dir("../../build")
.get()
rootProject.layout.buildDirectory.value(newBuildDir)
subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
example/android/gradle.properties
浏览文件 @
f8725b1c
org.gradle.jvmargs
=
-Xmx
1536
M
org.gradle.jvmargs
=
-Xmx
2048
M
android.useAndroidX
=
true
android.enableJetifier
=
true
example/android/gradle/wrapper/gradle-wrapper.properties
浏览文件 @
f8725b1c
...
...
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-7.6.3-all.zip
\ No newline at end of file
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-8.14-all.zip
\ No newline at end of file
example/android/settings.gradle
deleted
100644 → 0
浏览文件 @
72c27baf
include
':app'
def
localPropertiesFile
=
new
File
(
rootProject
.
projectDir
,
"local.properties"
)
def
properties
=
new
Properties
()
assert
localPropertiesFile
.
exists
()
localPropertiesFile
.
withReader
(
"UTF-8"
)
{
reader
->
properties
.
load
(
reader
)
}
def
flutterSdkPath
=
properties
.
getProperty
(
"flutter.sdk"
)
assert
flutterSdkPath
!=
null
,
"flutter.sdk not set in local.properties"
apply
from:
"$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
example/android/settings.gradle.kts
0 → 100644
浏览文件 @
f8725b1c
pluginManagement {
val flutterSdkPath =
run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.11.1" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
}
include(":app")
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论