diff --git a/dev/integration_tests/link_hook/hook/build.dart b/dev/integration_tests/link_hook/hook/build.dart index 19fb66ccc2..e27f4517cf 100644 --- a/dev/integration_tests/link_hook/hook/build.dart +++ b/dev/integration_tests/link_hook/hook/build.dart @@ -20,8 +20,8 @@ void main(List args) async { ); final BuildOutput outputCatcher = BuildOutput(); await cbuilder.run( - buildConfig: config, - buildOutput: outputCatcher, + config: config, + output: outputCatcher, logger: Logger('') ..level = Level.ALL ..onRecord.listen((LogRecord record) => print(record.message)), diff --git a/dev/integration_tests/link_hook/pubspec.yaml b/dev/integration_tests/link_hook/pubspec.yaml index a9a3906f53..d860dd4651 100644 --- a/dev/integration_tests/link_hook/pubspec.yaml +++ b/dev/integration_tests/link_hook/pubspec.yaml @@ -8,8 +8,8 @@ environment: dependencies: cli_config: 0.2.0 logging: 1.2.0 - native_assets_cli: 0.6.0 - native_toolchain_c: 0.4.2 + native_assets_cli: 0.6.1 + native_toolchain_c: 0.5.0 args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -67,4 +67,4 @@ dev_dependencies: webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml_edit: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 0444 +# PUBSPEC CHECKSUM: 3a44 diff --git a/packages/flutter_tools/lib/src/isolated/native_assets/ios/native_assets.dart b/packages/flutter_tools/lib/src/isolated/native_assets/ios/native_assets.dart index 09a1df007e..485164d238 100644 --- a/packages/flutter_tools/lib/src/isolated/native_assets/ios/native_assets.dart +++ b/packages/flutter_tools/lib/src/isolated/native_assets/ios/native_assets.dart @@ -107,6 +107,8 @@ Future> buildNativeAssetsIOS({ workingDirectory: projectUri, includeParentEnvironment: true, cCompilerConfig: await buildRunner.cCompilerConfig, + // TODO(dcharkes): Fetch minimum iOS version from somewhere. https://github.com/flutter/flutter/issues/145104 + targetIOSVersion: 12, ); ensureNativeAssetsBuildSucceed(buildResult); nativeAssets.addAll(buildResult.assets); @@ -120,6 +122,8 @@ Future> buildNativeAssetsIOS({ includeParentEnvironment: true, cCompilerConfig: await buildRunner.cCompilerConfig, buildResult: buildResult, + // TODO(dcharkes): Fetch minimum iOS version from somewhere. https://github.com/flutter/flutter/issues/145104 + targetIOSVersion: 12, ); ensureNativeAssetsLinkSucceed(linkResult); nativeAssets.addAll(linkResult.assets); diff --git a/packages/flutter_tools/lib/src/isolated/native_assets/macos/native_assets.dart b/packages/flutter_tools/lib/src/isolated/native_assets/macos/native_assets.dart index a29a35b9fd..675748db21 100644 --- a/packages/flutter_tools/lib/src/isolated/native_assets/macos/native_assets.dart +++ b/packages/flutter_tools/lib/src/isolated/native_assets/macos/native_assets.dart @@ -128,6 +128,8 @@ Future<(Uri? nativeAssetsYaml, List dependencies)> buildNativeAssetsMacOS({ workingDirectory: projectUri, includeParentEnvironment: true, cCompilerConfig: await buildRunner.cCompilerConfig, + // TODO(dcharkes): Fetch minimum MacOS version from somewhere. https://github.com/flutter/flutter/issues/145104 + targetMacOSVersion: 13, ); ensureNativeAssetsBuildSucceed(buildResult); nativeAssets.addAll(buildResult.assets); @@ -140,6 +142,8 @@ Future<(Uri? nativeAssetsYaml, List dependencies)> buildNativeAssetsMacOS({ includeParentEnvironment: true, cCompilerConfig: await buildRunner.cCompilerConfig, buildResult: buildResult, + // TODO(dcharkes): Fetch minimum MacOS version from somewhere. https://github.com/flutter/flutter/issues/145104 + targetMacOSVersion: 13, ); ensureNativeAssetsLinkSucceed(linkResult); nativeAssets.addAll(linkResult.assets); diff --git a/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart b/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart index aed21c2305..1a11e12792 100644 --- a/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart +++ b/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart @@ -61,6 +61,8 @@ abstract class NativeAssetsBuildRunner { required Uri workingDirectory, CCompilerConfigImpl? cCompilerConfig, int? targetAndroidNdkApi, + int? targetIOSVersion, + int? targetMacOSVersion, IOSSdkImpl? targetIOSSdkImpl, }); @@ -83,6 +85,8 @@ abstract class NativeAssetsBuildRunner { required BuildResult buildResult, CCompilerConfigImpl? cCompilerConfig, int? targetAndroidNdkApi, + int? targetIOSVersion, + int? targetMacOSVersion, IOSSdkImpl? targetIOSSdkImpl, }); @@ -176,6 +180,8 @@ class NativeAssetsBuildRunnerImpl implements NativeAssetsBuildRunner { required Target target, required Uri workingDirectory, CCompilerConfigImpl? cCompilerConfig, + int? targetIOSVersion, + int? targetMacOSVersion, int? targetAndroidNdkApi, IOSSdkImpl? targetIOSSdkImpl, }) { @@ -193,6 +199,8 @@ class NativeAssetsBuildRunnerImpl implements NativeAssetsBuildRunner { targetIOSSdk: targetIOSSdkImpl, workingDirectory: workingDirectory, packageLayout: packageLayout, + targetIOSVersion: targetIOSVersion, + targetMacOSVersion: targetMacOSVersion, ); } @@ -229,6 +237,8 @@ class NativeAssetsBuildRunnerImpl implements NativeAssetsBuildRunner { required BuildResult buildResult, CCompilerConfigImpl? cCompilerConfig, int? targetAndroidNdkApi, + int? targetIOSVersion, + int? targetMacOSVersion, IOSSdkImpl? targetIOSSdkImpl, }) { final PackageLayout packageLayout = PackageLayout.fromPackageConfig( @@ -246,6 +256,8 @@ class NativeAssetsBuildRunnerImpl implements NativeAssetsBuildRunner { workingDirectory: workingDirectory, packageLayout: packageLayout, buildResult: buildResult, + targetIOSVersion: targetIOSVersion, + targetMacOSVersion: targetMacOSVersion, ); } diff --git a/packages/flutter_tools/pubspec.yaml b/packages/flutter_tools/pubspec.yaml index 0b5c42ce95..f10f49a281 100644 --- a/packages/flutter_tools/pubspec.yaml +++ b/packages/flutter_tools/pubspec.yaml @@ -56,8 +56,8 @@ dependencies: cli_config: 0.2.0 graphs: 2.3.1 - native_assets_builder: 0.7.0 - native_assets_cli: 0.6.0 + native_assets_builder: 0.7.1 + native_assets_cli: 0.6.1 # We depend on very specific internal implementation details of the # 'test' package, which change between versions, so when upgrading @@ -120,4 +120,4 @@ dartdoc: # Exclude this package from the hosted API docs. nodoc: true -# PUBSPEC CHECKSUM: f5a9 +# PUBSPEC CHECKSUM: 90ab diff --git a/packages/flutter_tools/templates/package_ffi/hook/build.dart.tmpl b/packages/flutter_tools/templates/package_ffi/hook/build.dart.tmpl index 61c244d580..73be953f99 100644 --- a/packages/flutter_tools/templates/package_ffi/hook/build.dart.tmpl +++ b/packages/flutter_tools/templates/package_ffi/hook/build.dart.tmpl @@ -16,8 +16,8 @@ void main(List args) async { dartBuildFiles: ['hook/build.dart'], ); await cbuilder.run( - buildConfig: config, - buildOutput: output, + config: config, + output: output, logger: Logger('') ..level = Level.ALL ..onRecord.listen((record) => print(record.message)), diff --git a/packages/flutter_tools/templates/package_ffi/pubspec.yaml.tmpl b/packages/flutter_tools/templates/package_ffi/pubspec.yaml.tmpl index fa72154cdf..24079d3787 100644 --- a/packages/flutter_tools/templates/package_ffi/pubspec.yaml.tmpl +++ b/packages/flutter_tools/templates/package_ffi/pubspec.yaml.tmpl @@ -9,8 +9,8 @@ environment: dependencies: cli_config: ^0.2.0 logging: ^1.2.0 - native_assets_cli: ^0.6.0 - native_toolchain_c: ^0.4.2 + native_assets_cli: ^0.6.1 + native_toolchain_c: ^0.5.0 dev_dependencies: ffi: ^2.1.2 diff --git a/packages/flutter_tools/test/general.shard/isolated/fake_native_assets_build_runner.dart b/packages/flutter_tools/test/general.shard/isolated/fake_native_assets_build_runner.dart index 88f51d59e3..40a4f1217f 100644 --- a/packages/flutter_tools/test/general.shard/isolated/fake_native_assets_build_runner.dart +++ b/packages/flutter_tools/test/general.shard/isolated/fake_native_assets_build_runner.dart @@ -56,6 +56,8 @@ class FakeNativeAssetsBuildRunner implements NativeAssetsBuildRunner { required Uri workingDirectory, CCompilerConfigImpl? cCompilerConfig, int? targetAndroidNdkApi, + int? targetIOSVersion, + int? targetMacOSVersion, IOSSdkImpl? targetIOSSdkImpl, }) async { buildInvocations++; @@ -73,6 +75,8 @@ class FakeNativeAssetsBuildRunner implements NativeAssetsBuildRunner { required native_assets_builder.BuildResult buildResult, CCompilerConfigImpl? cCompilerConfig, int? targetAndroidNdkApi, + int? targetIOSVersion, + int? targetMacOSVersion, IOSSdkImpl? targetIOSSdkImpl, }) async { linkInvocations++;