Update core version
Update flutter version Optimize ip check Optimize url-test
This commit is contained in:
30
setup.dart
30
setup.dart
@@ -55,8 +55,7 @@ class BuildLibItem {
|
||||
}
|
||||
|
||||
class Build {
|
||||
static List<BuildLibItem> get buildItems =>
|
||||
[
|
||||
static List<BuildLibItem> get buildItems => [
|
||||
BuildLibItem(
|
||||
platform: PlatformType.macos,
|
||||
arch: Arch.amd64,
|
||||
@@ -115,7 +114,7 @@ class Build {
|
||||
final ndk = environment["ANDROID_NDK"];
|
||||
assert(ndk != null);
|
||||
final prebuiltDir =
|
||||
Directory(join(ndk!, "toolchains", "llvm", "prebuilt"));
|
||||
Directory(join(ndk!, "toolchains", "llvm", "prebuilt"));
|
||||
final prebuiltDirList = prebuiltDir.listSync();
|
||||
final map = {
|
||||
"armeabi-v7a": "armv7a-linux-androideabi21-clang",
|
||||
@@ -134,7 +133,8 @@ class Build {
|
||||
|
||||
static get tags => "with_gvisor";
|
||||
|
||||
static Future<void> exec(List<String> executable, {
|
||||
static Future<void> exec(
|
||||
List<String> executable, {
|
||||
String? name,
|
||||
Map<String, String>? environment,
|
||||
String? workingDirectory,
|
||||
@@ -163,7 +163,7 @@ class Build {
|
||||
Arch? arch,
|
||||
}) async {
|
||||
final items = buildItems.where(
|
||||
(element) {
|
||||
(element) {
|
||||
return element.platform == platform &&
|
||||
(arch == null ? true : element.arch == arch);
|
||||
},
|
||||
@@ -276,11 +276,10 @@ class BuildCommand extends Command {
|
||||
@override
|
||||
String get name => platform.name;
|
||||
|
||||
List<Arch> get arches =>
|
||||
Build.buildItems
|
||||
.where((element) => element.platform == platform)
|
||||
.map((e) => e.arch)
|
||||
.toList();
|
||||
List<Arch> get arches => Build.buildItems
|
||||
.where((element) => element.platform == platform)
|
||||
.map((e) => e.arch)
|
||||
.toList();
|
||||
|
||||
Future<void> _buildLib(Arch? arch) async {
|
||||
await Build.buildLib(platform: platform, arch: arch);
|
||||
@@ -337,11 +336,13 @@ class BuildCommand extends Command {
|
||||
String args = '',
|
||||
}) async {
|
||||
await Build.getDistributor();
|
||||
/* final tag = Platform.environment["TAG"] ?? "+";
|
||||
final isDev = tag.contains("+");
|
||||
final channelArgs = isDev && platform == PlatformType.android ? "--build-flavor dev" : "";*/
|
||||
await Build.exec(
|
||||
name: name,
|
||||
Build.getExecutable(
|
||||
"flutter_distributor package --skip-clean --platform ${platform
|
||||
.name} --targets $targets --flutter-build-args=verbose $args",
|
||||
"flutter_distributor package --skip-clean --platform ${platform.name} --targets $targets --flutter-build-args=verbose $args",
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -351,7 +352,7 @@ class BuildCommand extends Command {
|
||||
final String build = argResults?['build'] ?? 'all';
|
||||
final archName = argResults?['arch'];
|
||||
final currentArches =
|
||||
arches.where((element) => element.name == archName).toList();
|
||||
arches.where((element) => element.name == archName).toList();
|
||||
final arch = currentArches.isEmpty ? null : currentArches.first;
|
||||
if (arch == null && platform == PlatformType.windows) {
|
||||
throw "Invalid arch";
|
||||
@@ -389,8 +390,7 @@ class BuildCommand extends Command {
|
||||
platform: platform,
|
||||
targets: "apk",
|
||||
args:
|
||||
"--flutter-build-args split-per-abi --build-target-platform ${defaultTargets
|
||||
.join(",")}",
|
||||
"--flutter-build-args split-per-abi --build-target-platform ${defaultTargets.join(",")}",
|
||||
);
|
||||
case PlatformType.macos:
|
||||
await _getMacosDependencies();
|
||||
|
||||
Reference in New Issue
Block a user