Skip to content

Commit 0d5375a

Browse files
committed
- Update native sdk versions
- Add registerApp function
1 parent f518594 commit 0d5375a

File tree

32 files changed

+84
-33
lines changed

32 files changed

+84
-33
lines changed

android/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ group 'com.jarvan.tobias'
22
version '1.0-SNAPSHOT'
33

44
buildscript {
5-
ext.kotlin_version = '1.8.22'
5+
ext.kotlin_version = '2.1.0'
66
repositories {
77
google()
88
mavenCentral()
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:8.7.0'
12+
classpath 'com.android.tools.build:gradle:8.9.1'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
1515
}
@@ -46,14 +46,14 @@ android {
4646
}
4747

4848
defaultConfig {
49-
minSdkVersion 19
49+
minSdkVersion 24
5050
consumerProguardFiles 'consumer-proguard-rules.txt'
5151
}
5252

5353
dependencies {
54-
implementation 'com.alipay.sdk:alipaysdk-android:15.8.35'
55-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1'
56-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1'
54+
implementation 'com.alipay.sdk:alipaysdk-android:15.8.38'
55+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2'
56+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2'
5757

5858
testImplementation 'org.jetbrains.kotlin:kotlin-test'
5959
testImplementation 'org.mockito:mockito-core:5.0.0'

android/src/main/kotlin/com/jarvan/tobias/TobaisPluginDelegate.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import android.app.Activity
44
import android.content.Intent
55
import android.content.pm.PackageManager
66
import android.net.Uri
7+
import com.alipay.sdk.app.AlipayApi
78
import com.alipay.sdk.app.AuthTask
89
import com.alipay.sdk.app.EnvUtils
910
import com.alipay.sdk.app.PayTask
@@ -25,6 +26,7 @@ class TobaisPluginDelegate : CoroutineScope {
2526
var activity: Activity? = null
2627
fun handleMethodCall(call: MethodCall, result: Result) {
2728
when (call.method) {
29+
"registerApp" -> registerApp(call,result)
2830
"version" -> version(result)
2931
"pay" -> pay(call, result)
3032
"auth" -> auth(call, result)
@@ -77,6 +79,14 @@ class TobaisPluginDelegate : CoroutineScope {
7779
alipay.authV2(authInfo, true) ?: mapOf<String, String>()
7880
}
7981

82+
private fun registerApp(call: MethodCall, result: Result) {
83+
activity?.let {
84+
val appId: String? = call.argument("appId")
85+
AlipayApi.registerApp(it,appId)
86+
}
87+
result.success(null)
88+
}
89+
8090
private fun version(result: Result) {
8191
launch {
8292
val version = doGetVersionTask()

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip

example/android/settings.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
21-
id("com.android.application") version "8.7.0" apply false
22-
id("org.jetbrains.kotlin.android") version "1.8.22" apply false
21+
id("com.android.application") version "8.9.1" apply false
22+
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
2323
}
2424

2525
include(":app")

example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>12.0</string>
24+
<string>13.0</string>
2525
</dict>
2626
</plist>

example/ios/Flutter/Flutter.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
1111
s.license = { :type => 'BSD' }
1212
s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
1313
s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
14-
s.ios.deployment_target = '12.0'
14+
s.ios.deployment_target = '13.0'
1515
# Framework linking is handled by Flutter tooling, not CocoaPods.
1616
# Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs.
1717
s.vendored_frameworks = 'path/to/nothing'

example/ios/Flutter/flutter_export_environment.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ export "FLUTTER_APPLICATION_PATH=/Users/jarvanzhang/StudioProjects/tobias/exampl
55
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
66
export "FLUTTER_TARGET=/Users/jarvanzhang/StudioProjects/tobias/example/lib/main.dart"
77
export "FLUTTER_BUILD_DIR=build"
8-
export "FLUTTER_BUILD_NAME=1.0.0"
8+
export "FLUTTER_BUILD_NAME=0.1.0"
99
export "FLUTTER_BUILD_NUMBER=1"
10-
export "DART_DEFINES=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl,RkxVVFRFUl9WRVJTSU9OPTMuMzIuOA==,RkxVVFRFUl9DSEFOTkVMPXN0YWJsZQ==,RkxVVFRFUl9HSVRfVVJMPWh0dHBzOi8vZ2l0aHViLmNvbS9mbHV0dGVyL2ZsdXR0ZXIuZ2l0,RkxVVFRFUl9GUkFNRVdPUktfUkVWSVNJT049ZWRhZGE3YzU2ZQ==,RkxVVFRFUl9FTkdJTkVfUkVWSVNJT049ZWYwY2QwMDA5MQ==,RkxVVFRFUl9EQVJUX1ZFUlNJT049My44LjE="
10+
export "DART_DEFINES=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl,RkxVVFRFUl9WRVJTSU9OPTMuMzUuNw==,RkxVVFRFUl9DSEFOTkVMPXN0YWJsZQ==,RkxVVFRFUl9HSVRfVVJMPWh0dHBzOi8vZ2l0aHViLmNvbS9mbHV0dGVyL2ZsdXR0ZXIuZ2l0,RkxVVFRFUl9GUkFNRVdPUktfUkVWSVNJT049YWRjOTAxMDYyNQ==,RkxVVFRFUl9FTkdJTkVfUkVWSVNJT049MDM1MzE2NTY1YQ==,RkxVVFRFUl9EQVJUX1ZFUlNJT049My45LjI="
1111
export "DART_OBFUSCATION=false"
1212
export "TRACK_WIDGET_CREATION=true"
1313
export "TREE_SHAKE_ICONS=false"

example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
platform :ios, '12.0'
2+
platform :ios, '13.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ EXTERNAL SOURCES:
1717
:path: ".symlinks/plugins/tobias/ios"
1818

1919
SPEC CHECKSUMS:
20-
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
20+
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
2121
tobias: f9c405df3ded93ad34539200fe3e7779cfb19081
2222

23-
PODFILE CHECKSUM: beab77b38961de946f08660e554f80ac174dc842
23+
PODFILE CHECKSUM: a5dd15803c05a42a9ae1068254e24631f03bf853
2424

2525
COCOAPODS: 1.16.2

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
B243AD49F47302411233B516 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
7070
D2A7BBBBFF709BA27749C289 /* libPods-RunnerTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RunnerTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
7171
FFD2CB2F44ABC32F53850FB4 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
72+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
7273
/* End PBXFileReference section */
7374

7475
/* Begin PBXFrameworksBuildPhase section */
@@ -116,6 +117,7 @@
116117
9740EEB11CF90186004384FC /* Flutter */ = {
117118
isa = PBXGroup;
118119
children = (
120+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
119121
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
120122
9740EEB21CF90195004384FC /* Debug.xcconfig */,
121123
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
@@ -472,7 +474,7 @@
472474
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
473475
GCC_WARN_UNUSED_FUNCTION = YES;
474476
GCC_WARN_UNUSED_VARIABLE = YES;
475-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
477+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
476478
MTL_ENABLE_DEBUG_INFO = NO;
477479
SDKROOT = iphoneos;
478480
SUPPORTED_PLATFORMS = iphoneos;
@@ -590,7 +592,7 @@
590592
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
591593
GCC_WARN_UNUSED_FUNCTION = YES;
592594
GCC_WARN_UNUSED_VARIABLE = YES;
593-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
595+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
594596
MTL_ENABLE_DEBUG_INFO = YES;
595597
ONLY_ACTIVE_ARCH = YES;
596598
SDKROOT = iphoneos;
@@ -639,7 +641,7 @@
639641
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
640642
GCC_WARN_UNUSED_FUNCTION = YES;
641643
GCC_WARN_UNUSED_VARIABLE = YES;
642-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
644+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
643645
MTL_ENABLE_DEBUG_INFO = NO;
644646
SDKROOT = iphoneos;
645647
SUPPORTED_PLATFORMS = iphoneos;

0 commit comments

Comments
 (0)