Skip to content

Commit

Permalink
Fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem committed Nov 29, 2023
1 parent 5ff082f commit 4755b64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
9 changes: 2 additions & 7 deletions pkgs/native_assets_cli/example/native_add_library/build.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:io';

import 'package:logging/logging.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';
Expand Down Expand Up @@ -34,16 +32,13 @@ void main(List<String> args) async {
..level = Level.ALL
..onRecord.listen((record) => print(record.message)),
);

buildOutput.assets.add(
Asset(
id: 'package:$packageName/ajsonfile',
linkMode: LinkMode.dynamic,
target: buildConfig.target,
path: AssetAbsolutePath(File(
'pkgs/native_assets_cli/example/native_add_library/data_asset_build.json')
.absolute
.uri),
path: AssetAbsolutePath(
buildConfig.packageRoot.resolve('data_asset_build.json')),
type: AssetType.data,
),
);
Expand Down
5 changes: 3 additions & 2 deletions pkgs/native_assets_cli/example/native_add_library/link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:native_assets_cli/native_assets_cli.dart';
const packageName = 'native_add_library';
void main(List<String> args) async {
final linkInput = await LinkInput.fromArgs(args);
final buildConfig = await BuildConfig.fromArgs(args);

final shakenAssets = MyResourceShaker().shake(
linkInput.buildOutput.assets,
Expand All @@ -18,8 +19,8 @@ void main(List<String> args) async {
id: 'package:$packageName/ajsonfil2e',
linkMode: LinkMode.dynamic,
target: Target.androidArm,
path: AssetAbsolutePath(Uri.file(
'/home/mosum/projects/native/pkgs/native_assets_cli/example/native_add_library/data_asset_link.json')),
path: AssetAbsolutePath(
buildConfig.packageRoot.resolve('data_asset_link.json')),
type: AssetType.data,
),
);
Expand Down

0 comments on commit 4755b64

Please sign in to comment.