Skip to content

Commit

Permalink
add code validators
Browse files Browse the repository at this point in the history
  • Loading branch information
dcharkes committed Jan 8, 2025
1 parent 68028dc commit a8bc599
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,23 @@ void main(List<String> args) async {
macOS: targetOS == OS.macOS
? MacOSConfig(targetVersion: defaultMacOSVersion)
: null,
android:
targetOS == OS.android ? AndroidConfig(targetNdkApi: 30) : null,
linkModePreference: LinkModePreference.dynamic,
),

workingDirectory: packageUri,
linkingEnabled: false,
buildAssetTypes: [DataAsset.type, CodeAsset.type],
inputValidator: validateDataAssetBuildInput,
buildValidator: (input, output) async =>
await validateDataAssetBuildOutput(input, output),
applicationAssetValidator: (_) async => [],
inputValidator: (input) async => [
...await validateDataAssetBuildInput(input),
...await validateCodeAssetBuildInput(input),
],
buildValidator: (input, output) async => [
...await validateDataAssetBuildOutput(input, output),
...await validateCodeAssetBuildOutput(input, output),
],
applicationAssetValidator: validateCodeAssetInApplication,
);
if (result == null) {
throw Error();
Expand Down

0 comments on commit a8bc599

Please sign in to comment.