Skip to content

Commit 6389e7e

Browse files
authored
Merge pull request #1288 from carp-dk:pedo-spm-gdl
Update AGP, Kotlin and support SPM
2 parents 56a597a + 4d1eb1d commit 6389e7e

17 files changed

Lines changed: 159 additions & 104 deletions

File tree

packages/pedometer/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 4.2.0
2+
3+
- Update Kotlin version
4+
- Update Gradle version
5+
- Enabled SPM support for iOS
6+
17
## 4.1.1
28

39
- upgrading kotlin version

packages/pedometer/android/build.gradle

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

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

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.3.0'
12+
classpath 'com.android.tools.build:gradle:8.12.1'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
1515
}
@@ -51,5 +51,5 @@ android {
5151
}
5252

5353
dependencies {
54-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
54+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
5555
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
org.gradle.jvmargs=-Xmx1536M
2-
android.enableR8=true
32
android.useAndroidX=true
43
android.enableJetifier=true
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
org.gradle.jvmargs=-Xmx1536M
2-
android.enableR8=true
32
android.useAndroidX=true
43
android.enableJetifier=true

packages/pedometer/example/android/settings.gradle

Lines changed: 3 additions & 3 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.2"
21-
id "com.android.application" version "8.1.0" apply false
22-
id "org.jetbrains.kotlin.android" version "1.9.20" apply false
21+
id "com.android.application" version "8.12.1" apply false
22+
id "org.jetbrains.kotlin.android" version "2.2.20" apply false
2323
}
2424

25-
include ":app"
25+
include ":app"

packages/pedometer/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'

packages/pedometer/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
1B00ECF7F4F541CD40271723 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE298C9B7458504BFF27123D /* Pods_Runner.framework */; };
1212
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1313
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
14+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
1415
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1516
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1617
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -36,6 +37,7 @@
3637
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3738
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
3839
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
40+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
3941
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
4042
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
4143
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
@@ -54,6 +56,7 @@
5456
isa = PBXFrameworksBuildPhase;
5557
buildActionMask = 2147483647;
5658
files = (
59+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
5760
1B00ECF7F4F541CD40271723 /* Pods_Runner.framework in Frameworks */,
5861
);
5962
runOnlyForDeploymentPostprocessing = 0;
@@ -64,6 +67,7 @@
6467
9740EEB11CF90186004384FC /* Flutter */ = {
6568
isa = PBXGroup;
6669
children = (
70+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
6771
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
6872
9740EEB21CF90195004384FC /* Debug.xcconfig */,
6973
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
@@ -146,14 +150,16 @@
146150
97C146EC1CF9000F007C117D /* Resources */,
147151
9705A1C41CF9048500538489 /* Embed Frameworks */,
148152
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
149-
00A08FEAB80467916AC4FDF4 /* [CP] Embed Pods Frameworks */,
150153
2BDA796D1FA6DEE9457E8DF1 /* [CP] Copy Pods Resources */,
151154
);
152155
buildRules = (
153156
);
154157
dependencies = (
155158
);
156159
name = Runner;
160+
packageProductDependencies = (
161+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
162+
);
157163
productName = Runner;
158164
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
159165
productType = "com.apple.product-type.application";
@@ -182,6 +188,9 @@
182188
Base,
183189
);
184190
mainGroup = 97C146E51CF9000F007C117D;
191+
packageReferences = (
192+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
193+
);
185194
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
186195
projectDirPath = "";
187196
projectRoot = "";
@@ -206,23 +215,6 @@
206215
/* End PBXResourcesBuildPhase section */
207216

208217
/* Begin PBXShellScriptBuildPhase section */
209-
00A08FEAB80467916AC4FDF4 /* [CP] Embed Pods Frameworks */ = {
210-
isa = PBXShellScriptBuildPhase;
211-
buildActionMask = 2147483647;
212-
files = (
213-
);
214-
inputFileListPaths = (
215-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
216-
);
217-
name = "[CP] Embed Pods Frameworks";
218-
outputFileListPaths = (
219-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
220-
);
221-
runOnlyForDeploymentPostprocessing = 0;
222-
shellPath = /bin/sh;
223-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
224-
showEnvVarsInLog = 0;
225-
};
226218
2BDA796D1FA6DEE9457E8DF1 /* [CP] Copy Pods Resources */ = {
227219
isa = PBXShellScriptBuildPhase;
228220
buildActionMask = 2147483647;
@@ -368,7 +360,7 @@
368360
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
369361
GCC_WARN_UNUSED_FUNCTION = YES;
370362
GCC_WARN_UNUSED_VARIABLE = YES;
371-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
363+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
372364
MTL_ENABLE_DEBUG_INFO = NO;
373365
SDKROOT = iphoneos;
374366
SUPPORTED_PLATFORMS = iphoneos;
@@ -391,7 +383,7 @@
391383
"$(PROJECT_DIR)/Flutter",
392384
);
393385
INFOPLIST_FILE = Runner/Info.plist;
394-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
386+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
395387
LD_RUNPATH_SEARCH_PATHS = (
396388
"$(inherited)",
397389
"@executable_path/Frameworks",
@@ -455,7 +447,7 @@
455447
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
456448
GCC_WARN_UNUSED_FUNCTION = YES;
457449
GCC_WARN_UNUSED_VARIABLE = YES;
458-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
450+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
459451
MTL_ENABLE_DEBUG_INFO = YES;
460452
ONLY_ACTIVE_ARCH = YES;
461453
SDKROOT = iphoneos;
@@ -504,7 +496,7 @@
504496
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
505497
GCC_WARN_UNUSED_FUNCTION = YES;
506498
GCC_WARN_UNUSED_VARIABLE = YES;
507-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
499+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
508500
MTL_ENABLE_DEBUG_INFO = NO;
509501
SDKROOT = iphoneos;
510502
SUPPORTED_PLATFORMS = iphoneos;
@@ -529,7 +521,7 @@
529521
"$(PROJECT_DIR)/Flutter",
530522
);
531523
INFOPLIST_FILE = Runner/Info.plist;
532-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
524+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
533525
LD_RUNPATH_SEARCH_PATHS = (
534526
"$(inherited)",
535527
"@executable_path/Frameworks",
@@ -561,7 +553,7 @@
561553
"$(PROJECT_DIR)/Flutter",
562554
);
563555
INFOPLIST_FILE = Runner/Info.plist;
564-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
556+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
565557
LD_RUNPATH_SEARCH_PATHS = (
566558
"$(inherited)",
567559
"@executable_path/Frameworks",
@@ -602,6 +594,20 @@
602594
defaultConfigurationName = Release;
603595
};
604596
/* End XCConfigurationList section */
597+
598+
/* Begin XCLocalSwiftPackageReference section */
599+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
600+
isa = XCLocalSwiftPackageReference;
601+
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
602+
};
603+
/* End XCLocalSwiftPackageReference section */
604+
605+
/* Begin XCSwiftPackageProductDependency section */
606+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
607+
isa = XCSwiftPackageProductDependency;
608+
productName = FlutterGeneratedPluginSwiftPackage;
609+
};
610+
/* End XCSwiftPackageProductDependency section */
605611
};
606612
rootObject = 97C146E61CF9000F007C117D /* Project object */;
607613
}

packages/pedometer/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<PreActions>
9+
<ExecutionAction
10+
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
11+
<ActionContent
12+
title = "Run Prepare Flutter Framework Script"
13+
scriptText = "/bin/sh &quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
14+
<EnvironmentBuildable>
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
18+
BuildableName = "Runner.app"
19+
BlueprintName = "Runner"
20+
ReferencedContainer = "container:Runner.xcodeproj">
21+
</BuildableReference>
22+
</EnvironmentBuildable>
23+
</ActionContent>
24+
</ExecutionAction>
25+
</PreActions>
826
<BuildActionEntries>
927
<BuildActionEntry
1028
buildForTesting = "YES"
@@ -26,6 +44,7 @@
2644
buildConfiguration = "Debug"
2745
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2846
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
47+
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
2948
shouldUseLaunchSchemeArgsEnv = "YES">
3049
<Testables>
3150
</Testables>
@@ -45,6 +64,7 @@
4564
buildConfiguration = "Debug"
4665
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4766
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
67+
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
4868
launchStyle = "0"
4969
useCustomWorkingDirectory = "NO"
5070
ignoresPersistentStateOnLaunch = "NO"
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
import UIKit
21
import Flutter
2+
import UIKit
33

44
@main
5-
@objc class AppDelegate: FlutterAppDelegate {
5+
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
66
override func application(
77
_ application: UIApplication,
88
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
99
) -> Bool {
10-
GeneratedPluginRegistrant.register(with: self)
1110
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
1211
}
12+
13+
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
14+
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
15+
}
1316
}

packages/pedometer/example/ios/Runner/Info.plist

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CADisableMinimumFrameDurationOnPhone</key>
6+
<true/>
57
<key>CFBundleDevelopmentRegion</key>
68
<string>$(DEVELOPMENT_LANGUAGE)</string>
79
<key>CFBundleExecutable</key>
@@ -24,6 +26,29 @@
2426
<true/>
2527
<key>NSMotionUsageDescription</key>
2628
<string>This application tracks your steps</string>
29+
<key>UIApplicationSceneManifest</key>
30+
<dict>
31+
<key>UIApplicationSupportsMultipleScenes</key>
32+
<false/>
33+
<key>UISceneConfigurations</key>
34+
<dict>
35+
<key>UIWindowSceneSessionRoleApplication</key>
36+
<array>
37+
<dict>
38+
<key>UISceneClassName</key>
39+
<string>UIWindowScene</string>
40+
<key>UISceneConfigurationName</key>
41+
<string>flutter</string>
42+
<key>UISceneDelegateClassName</key>
43+
<string>FlutterSceneDelegate</string>
44+
<key>UISceneStoryboardFile</key>
45+
<string>Main</string>
46+
</dict>
47+
</array>
48+
</dict>
49+
</dict>
50+
<key>UIApplicationSupportsIndirectInputEvents</key>
51+
<true/>
2752
<key>UIBackgroundModes</key>
2853
<array>
2954
<string>processing</string>
@@ -47,9 +72,5 @@
4772
</array>
4873
<key>UIViewControllerBasedStatusBarAppearance</key>
4974
<false/>
50-
<key>CADisableMinimumFrameDurationOnPhone</key>
51-
<true/>
52-
<key>UIApplicationSupportsIndirectInputEvents</key>
53-
<true/>
5475
</dict>
5576
</plist>

0 commit comments

Comments
 (0)