File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
native_assets_builder/lib/src/build_runner
native_assets_cli/lib/src Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -232,13 +232,15 @@ class NativeAssetsBuildRunner {
232
232
buildMode: buildMode,
233
233
packageName: package.name,
234
234
packageRoot: packageLayout.packageRoot (package.name),
235
- )
236
- ..setupLinkConfig (
237
- assets: buildResult.encodedAssetsForLinking[package.name] ?? []);
235
+ );
238
236
239
237
final (buildDirUri, outDirUri, outDirSharedUri) = await _setupDirectories (
240
238
Hook .link, packageLayout, configBuilder, package);
241
239
240
+ configBuilder.setupLinkConfig (
241
+ assets: buildResult.encodedAssetsForLinking[package.name] ?? [],
242
+ );
243
+
242
244
File ? resourcesFile;
243
245
if (resourceIdentifiers != null ) {
244
246
resourcesFile = File .fromUri (buildDirUri.resolve ('resources.json' ));
Original file line number Diff line number Diff line change @@ -135,10 +135,13 @@ sealed class HookConfigBuilder {
135
135
/// assumed the output directory has not been set yet.
136
136
String computeChecksum () {
137
137
if (json.containsKey (_outDirConfigKey) ||
138
- json.containsKey (_outDirSharedConfigKey)) {
138
+ json.containsKey (_outDirSharedConfigKey) ||
139
+ json.containsKey (_assetsKey)) {
139
140
// The bundling tools would first calculate the checksum, create an output
140
141
// directory and then call [BuildConfigBuilder.setupBuildRunConfig] &
141
142
// [LinkConfigBuilder.setupLinkRunConfig].
143
+ // The output directory should not depend on the assets passed in for
144
+ // linking.
142
145
throw StateError ('The checksum should be generated before setting '
143
146
'up the run configuration' );
144
147
}
You can’t perform that action at this time.
0 commit comments