Skip to content

Commit

Permalink
升级flutter到最新3.22.1 dart 3.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kathy1003 committed May 28, 2024
1 parent 6988480 commit 566cc97
Show file tree
Hide file tree
Showing 24 changed files with 2,570 additions and 1,728 deletions.
19 changes: 9 additions & 10 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
}
}

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'
Expand All @@ -21,17 +22,15 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
compileSdkVersion 34
useLibrary 'org.apache.http.legacy'
ndkVersion "25.1.8937393"
defaultConfig {
applicationId "com.mailvor.sufenbao"

minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
Expand Down
16 changes: 0 additions & 16 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,22 +113,6 @@
android:value="2" />

<!--一键登录SDK授权页activity-->
<activity
android:name="com.chuanglan.shanyan_sdk.view.CmccLoginActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="false"
android:launchMode="singleTop"
android:screenOrientation="unspecified"
android:theme="@style/MyTheme" />

<activity-alias
android:name="com.cmic.gen.sdk.view.GenLoginAuthActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="false"
android:launchMode="singleTop"
android:screenOrientation="unspecified"
android:targetActivity="com.chuanglan.shanyan_sdk.view.CmccLoginActivity"
android:theme="@style/MyTheme" />
<activity
android:name="com.chuanglan.shanyan_sdk.view.ShanYanOneKeyActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
Expand Down
17 changes: 1 addition & 16 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
buildscript {
ext.kotlin_version = '1.7.20'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
//取消注释这里 可以打开android查看完整AndroidManifest.xml
// classpath 'com.android.tools.build:gradle:4.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand All @@ -31,6 +16,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
org.gradle.java.home=C\:\\Program Files\\Java\\jdk-11.0.14
org.gradle.java.home=C\:\\Users\\jacky\\.jdks\\corretto-17.0.11
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.enableResourceOptimizations=false
29 changes: 19 additions & 10 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.1" apply false
id "org.jetbrains.kotlin.android" version "1.7.20" apply false
}

include ":app"
3 changes: 3 additions & 0 deletions package/flutter_picker/lib/flutter_picker.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export 'picker.dart';
export 'picker_localizations.dart';
export 'picker_localizations_delegate.dart';
Loading

0 comments on commit 566cc97

Please sign in to comment.