Merge branch 'main' of https://gitlab.com/famedly/famedlysdk into yiffed
This commit is contained in:
commit
9759b70bae
|
@ -129,3 +129,18 @@ pages:
|
||||||
- public
|
- public
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
# Adds license-scanning job. Because Gitlab does not support pub.dev
|
||||||
|
# we added https://github.com/oss-review-toolkit/ort
|
||||||
|
|
||||||
|
include:
|
||||||
|
- template: Security/License-Scanning.gitlab-ci.yml
|
||||||
|
|
||||||
|
license_scanning:
|
||||||
|
stage: coverage
|
||||||
|
image:
|
||||||
|
name: "registry.gitlab.com/gitlab-org/security-products/analyzers/ort/ort:latest"
|
||||||
|
script:
|
||||||
|
- /opt/ort/bin/ort analyze -i $CI_PROJECT_DIR -o $CI_PROJECT_DIR/ --allow-dynamic-versions
|
||||||
|
- /opt/ort/bin/ort scan -i $CI_PROJECT_DIR/analyzer-result.yml -o $CI_PROJECT_DIR/ || true
|
||||||
|
- /opt/ort/bin/ort report -f GitLabLicenseModel -i $CI_PROJECT_DIR/scan-result.yml -o $CI_PROJECT_DIR/
|
||||||
|
|
|
@ -21,7 +21,13 @@ import 'dart:async';
|
||||||
|
|
||||||
Future<T> runInBackground<T, U>(
|
Future<T> runInBackground<T, U>(
|
||||||
FutureOr<T> Function(U arg) function, U arg) async {
|
FutureOr<T> Function(U arg) function, U arg) async {
|
||||||
final isolate = await IsolateRunner.spawn();
|
IsolateRunner isolate;
|
||||||
|
try {
|
||||||
|
isolate = await IsolateRunner.spawn();
|
||||||
|
} on UnsupportedError {
|
||||||
|
// web does not support isolates (yet), so we fall back to calling the method directly
|
||||||
|
return await function(arg);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
return await isolate.run(function, arg);
|
return await isolate.run(function, arg);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in New Issue