Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[native assets] Roll dependencies #168139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev/integration_tests/hook_user_defines/hook/build.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:hooks/hooks.dart';
import 'package:logging/logging.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';

void main(List<String> args) async {
Expand Down
7 changes: 4 additions & 3 deletions dev/integration_tests/hook_user_defines/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ hooks:
magic_value: 1000

dependencies:
code_assets: 0.19.0
hooks: 0.19.0
logging: 1.3.0
native_assets_cli: 0.18.0
native_toolchain_c: 0.15.0
native_toolchain_c: 0.16.0

async: 2.13.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
collection: 1.19.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
Expand Down Expand Up @@ -74,4 +75,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.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"

# PUBSPEC CHECKSUM: 63c9
# PUBSPEC CHECKSUM: c6ed
4 changes: 2 additions & 2 deletions dev/integration_tests/link_hook/hook/build.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:code_assets/code_assets.dart';
import 'package:hooks/hooks.dart';
import 'package:logging/logging.dart';
import 'package:native_assets_cli/code_assets.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';

void main(List<String> args) async {
Expand Down
4 changes: 2 additions & 2 deletions dev/integration_tests/link_hook/hook/link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:native_assets_cli/code_assets.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:code_assets/code_assets.dart';
import 'package:hooks/hooks.dart';

void main(List<String> args) async {
await link(args, (LinkInput input, LinkOutputBuilder output) async {
Expand Down
7 changes: 4 additions & 3 deletions dev/integration_tests/link_hook/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ environment:
sdk: ^3.7.0-0

dependencies:
code_assets: 0.19.0
hooks: 0.19.0
logging: 1.3.0
native_assets_cli: 0.18.0
native_toolchain_c: 0.15.0
native_toolchain_c: 0.16.0

async: 2.13.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
collection: 1.19.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
Expand Down Expand Up @@ -69,4 +70,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.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"

# PUBSPEC CHECKSUM: 63c9
# PUBSPEC CHECKSUM: c6ed
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:native_assets_builder/native_assets_builder.dart';
import 'package:native_assets_cli/code_assets.dart';
import 'package:code_assets/code_assets.dart';
import 'package:hooks_runner/hooks_runner.dart';

import '../../../android/android_sdk.dart';
import '../../../android/gradle_utils.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:native_assets_builder/native_assets_builder.dart';
import 'package:native_assets_cli/code_assets.dart';
import 'package:code_assets/code_assets.dart';
import 'package:hooks_runner/hooks_runner.dart';

import '../../../base/file_system.dart';
import '../../../build_info.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:native_assets_cli/code_assets.dart';
import 'package:code_assets/code_assets.dart';

import '../../../base/common.dart';
import '../../../base/file_system.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:native_assets_builder/native_assets_builder.dart';
import 'package:native_assets_cli/code_assets.dart';
import 'package:code_assets/code_assets.dart';
import 'package:hooks_runner/hooks_runner.dart';

import '../../../base/file_system.dart';
import '../../../build_info.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// Shared logic between iOS and macOS implementations of native assets.

import 'package:native_assets_cli/code_assets.dart';
import 'package:code_assets/code_assets.dart';

import '../../../base/common.dart';
import '../../../base/file_system.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

// Logic for native assets shared between all host OSes.

import 'package:code_assets/code_assets.dart';
import 'package:hooks/hooks.dart';
import 'package:hooks_runner/hooks_runner.dart';
import 'package:logging/logging.dart' as logging;
import 'package:native_assets_builder/native_assets_builder.dart';
import 'package:native_assets_cli/code_assets.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:package_config/package_config_types.dart';

import '../../base/common.dart';
Expand Down Expand Up @@ -179,7 +179,7 @@ Future<void> installCodeAssets({

/// Programmatic API to be used by Dart launchers to invoke native builds.
///
/// It enables mocking `package:native_assets_builder` package.
/// It enables mocking `package:hooks_runner` package.
/// It also enables mocking native toolchain discovery via [cCompilerConfig].
abstract interface class FlutterNativeAssetsBuildRunner {
/// All packages in the transitive dependencies that have a `build.dart`.
Expand All @@ -204,7 +204,7 @@ abstract interface class FlutterNativeAssetsBuildRunner {
Future<CCompilerConfig?> get ndkCCompilerConfig;
}

/// Uses `package:native_assets_builder` for its implementation.
/// Uses `package:hooks_runner` for its implementation.
class FlutterNativeAssetsBuildRunnerImpl implements FlutterNativeAssetsBuildRunner {
FlutterNativeAssetsBuildRunnerImpl(
this.packageConfigPath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// Logic for native assets shared between all host OSes.

import 'package:native_assets_cli/code_assets.dart' show OS;
import 'package:code_assets/code_assets.dart' show OS;
import 'package:package_config/package_config_types.dart';

import '../../../base/platform.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:native_assets_cli/code_assets.dart';
import 'package:code_assets/code_assets.dart';

import '../../../globals.dart' as globals;
import '../../../windows/visual_studio.dart';
Expand Down
10 changes: 6 additions & 4 deletions packages/flutter_tools/lib/src/update_packages_pins.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
const Map<String, String> kManuallyPinnedDependencies = <String, String>{
// Add pinned packages here. Please leave a comment explaining why.
'archive': '3.6.1', // https://github.com/flutter/flutter/issues/115660
'code_assets':
'0.19.0', // Under active development with breaking changes until 1.0.0. Manually rolled by @dcharkes.
'flutter_gallery_assets': '1.0.2', // Tests depend on the exact version.
'flutter_template_images': '5.0.0', // Must always exactly match flutter_tools template.
'google_mobile_ads': '5.1.0', // https://github.com/flutter/flutter/issues/156912
'native_assets_builder':
'0.18.0', // Under active development with breaking changes until 1.0.0. Manually rolled by @dcharkes.
'native_assets_cli':
'0.18.0', // Under active development with breaking changes until 1.0.0. Manually rolled by @dcharkes.
'hooks':
'0.19.0', // Under active development with breaking changes until 1.0.0. Manually rolled by @dcharkes.
'hooks_runner':
'0.19.0', // Under active development with breaking changes until 1.0.0. Manually rolled by @dcharkes.
'material_color_utilities': '0.11.1', // Keep pinned to latest until 1.0.0.
'leak_tracker': '11.0.1', // https://github.com/flutter/devtools/issues/3951
'leak_tracker_testing': '3.0.2', // https://github.com/flutter/devtools/issues/3951
Expand Down
7 changes: 4 additions & 3 deletions packages/flutter_tools/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ dependencies:
unified_analytics: 8.0.1

graphs: 2.3.2
native_assets_builder: 0.18.0
native_assets_cli: 0.18.0
hooks_runner: 0.19.0
hooks: 0.19.0
code_assets: 0.19.0

# We depend on very specific internal implementation details of the
# 'test' package, which change between versions, so when upgrading
Expand Down Expand Up @@ -123,4 +124,4 @@ dartdoc:
# Exclude this package from the hosted API docs.
nodoc: true

# PUBSPEC CHECKSUM: 38a0
# PUBSPEC CHECKSUM: 771f
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:native_toolchain_c/native_toolchain_c.dart';
import 'package:logging/logging.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:hooks/hooks.dart';

void main(List<String> args) async {
await build(args, (input, output) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ environment:
sdk: {{dartSdkVersionBounds}}

dependencies:
code_assets: ^0.19.0
hooks: ^0.19.0
logging: ^1.3.0
native_assets_cli: ^0.18.0
native_toolchain_c: ^0.15.0
native_toolchain_c: ^0.16.0

dev_dependencies:
ffi: ^2.1.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:code_assets/code_assets.dart';
import 'package:file/file.dart';
import 'package:file/memory.dart';
import 'package:file_testing/file_testing.dart';
Expand All @@ -17,7 +18,6 @@ import 'package:flutter_tools/src/build_system/targets/native_assets.dart';
import 'package:flutter_tools/src/features.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/isolated/native_assets/native_assets.dart';
import 'package:native_assets_cli/code_assets.dart';

import '../../../src/common.dart';
import '../../../src/context.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:code_assets/code_assets.dart';
import 'package:flutter_tools/src/isolated/native_assets/native_assets.dart';
import 'package:native_assets_builder/native_assets_builder.dart';
import 'package:native_assets_cli/code_assets.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:hooks/hooks.dart';
import 'package:hooks_runner/hooks_runner.dart';

export 'package:native_assets_cli/code_assets.dart' show CodeAsset, DynamicLoadingBundled;
export 'package:code_assets/code_assets.dart' show CodeAsset, DynamicLoadingBundled;

/// Mocks all logic instead of using `package:native_assets_builder`, which
/// Mocks all logic instead of using `package:hooks_runner`, which
/// relies on doing process calls to `pub` and the local file system.
class FakeFlutterNativeAssetsBuildRunner implements FlutterNativeAssetsBuildRunner {
FakeFlutterNativeAssetsBuildRunner({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:code_assets/code_assets.dart';
import 'package:file/file.dart';
import 'package:file/memory.dart';
import 'package:file_testing/file_testing.dart';
Expand All @@ -15,8 +16,7 @@ import 'package:flutter_tools/src/build_system/targets/native_assets.dart';
import 'package:flutter_tools/src/features.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/isolated/native_assets/native_assets.dart';
import 'package:native_assets_cli/code_assets.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:hooks/hooks.dart';

import '../../../src/common.dart';
import '../../../src/context.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:code_assets/code_assets.dart';
import 'package:file/file.dart';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/artifacts.dart';
Expand All @@ -15,7 +16,6 @@ import 'package:flutter_tools/src/dart/package_map.dart';
import 'package:flutter_tools/src/features.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/isolated/native_assets/native_assets.dart';
import 'package:native_assets_cli/code_assets.dart';
import 'package:package_config/package_config_types.dart';

import '../../../src/common.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:code_assets/code_assets.dart';
import 'package:flutter_tools/src/isolated/native_assets/macos/native_assets_host.dart';
import 'package:native_assets_cli/code_assets.dart';

import '../../../src/common.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:code_assets/code_assets.dart';
import 'package:file/file.dart';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/artifacts.dart';
Expand All @@ -15,8 +16,7 @@ import 'package:flutter_tools/src/dart/package_map.dart';
import 'package:flutter_tools/src/features.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/isolated/native_assets/native_assets.dart';
import 'package:native_assets_cli/code_assets.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:hooks/hooks.dart';
import 'package:package_config/package_config_types.dart';

import '../../../src/common.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:code_assets/code_assets.dart';
import 'package:file/file.dart';
import 'package:file/memory.dart';
import 'package:file_testing/file_testing.dart';
Expand All @@ -13,7 +14,6 @@ import 'package:flutter_tools/src/build_system/build_system.dart';
import 'package:flutter_tools/src/build_system/targets/native_assets.dart';
import 'package:flutter_tools/src/features.dart';
import 'package:flutter_tools/src/isolated/native_assets/native_assets.dart';
import 'package:native_assets_cli/code_assets.dart';

import '../../src/common.dart';
import '../../src/context.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:code_assets/code_assets.dart' as code_assets;
import 'package:code_assets/code_assets.dart';
import 'package:file/file.dart';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/artifacts.dart';
Expand All @@ -15,8 +17,6 @@ import 'package:flutter_tools/src/dart/package_map.dart';
import 'package:flutter_tools/src/features.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/isolated/native_assets/native_assets.dart';
import 'package:native_assets_cli/code_assets.dart' as native_assets_cli;
import 'package:native_assets_cli/code_assets.dart';
import 'package:package_config/package_config_types.dart';

import '../../../src/common.dart';
Expand Down Expand Up @@ -113,7 +113,7 @@ void main() {
buildRunner: buildRunner,
);
final String expectedDirectory =
flutterTester ? native_assets_cli.OS.current.toString() : 'windows';
flutterTester ? code_assets.OS.current.toString() : 'windows';
final Uri nativeAssetsFileUri =
flutterTester
? projectUri.resolve(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ library;
import 'dart:convert';
import 'dart:io';

import 'package:code_assets/code_assets.dart';
import 'package:file/file.dart';
import 'package:file_testing/file_testing.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/base/os.dart';
import 'package:native_assets_cli/code_assets.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:hooks/hooks.dart';

import '../../src/common.dart';
import '../test_utils.dart' show fileSystem, flutterBin, platform;
Expand Down Expand Up @@ -455,7 +455,7 @@ void expectDylibIsBundledWithFrameworks(Directory appDirectory, String buildMode
/// This inspects the build configuration to see if the C compiler was configured.
void expectCCompilerIsConfigured(Directory appDirectory) {
final Directory nativeAssetsBuilderDir = appDirectory.childDirectory(
'.dart_tool/native_assets_builder/$packageName/',
'.dart_tool/hooks_runner/$packageName/',
);
for (final Directory subDir in nativeAssetsBuilderDir.listSync().whereType<Directory>()) {
// We only want to look at build/link hook invocation directories. The
Expand Down
Loading
Loading