Skip to content

Commit 4010970

Browse files
committed
Add accurate speed url for Dart
1 parent 6e40cfe commit 4010970

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed

src/recipe/lang/Dart/Flutter.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
* |
88
* Created On : <2023-09-10>
99
* Major Revision : 2
10-
* Last Modified : <2025-06-19>
10+
* Last Modified : <2025-07-11>
1111
*
1212
* 2024-09-14: 不得不将Dart和Flutter拆分为两个Target,
1313
* 因为3家教育网镜像站给出的 Dart 和 Flutter 换源URL模式都不一样
1414
* ------------------------------------------------------------*/
1515

16+
#define PL_Dart_Flutter_Speed_URL_Postfix "/flutter_infra_release/releases/stable/linux/flutter_linux_v1.0.0-stable.tar.xz"
17+
1618
/**
1719
* @update 2025-04-15
1820
*/
@@ -24,11 +26,15 @@ static SourceProvider_t pl_dart_flutter_upstream =
2426

2527
static Source_t pl_dart_flutter_sources[] =
2628
{
27-
{&pl_dart_flutter_upstream, "https://storage.googleapis.com"},
28-
{&FlutterCN, "https://storage.flutter-io.cn"},
29-
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn"}, // 没有后缀,怀疑是否存在问题
30-
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/flutter"},
31-
{&Nju, "https://mirror.nju.edu.cn/flutter"}
29+
{&pl_dart_flutter_upstream, "https://storage.googleapis.com", DelegateToUpstream},
30+
{&FlutterCN, "https://storage.flutter-io.cn", DelegateToMirror},
31+
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn", NULL }, /* 官方文档也没有给后缀,怀疑是否存在问题 */
32+
33+
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/flutter",
34+
"https://mirrors.tuna.tsinghua.edu.cn/flutter" PL_Dart_Flutter_Speed_URL_Postfix},
35+
36+
{&Nju, "https://mirror.nju.edu.cn/flutter",
37+
"https://mirror.nju.edu.cn/flutter" PL_Dart_Flutter_Speed_URL_Postfix}
3238
};
3339
def_sources_n(pl_dart_flutter);
3440

src/recipe/lang/Dart/Pub.c

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
* |
88
* Created On : <2023-09-10>
99
* Major Revision : 3
10-
* Last Modified : <2025-06-19>
10+
* Last Modified : <2025-07-11>
1111
*
1212
* Dart Pub 软件仓库
1313
* ------------------------------------------------------------*/
1414

15+
#define PL_Dart_Pub_Speed_URL_Postfix "/packages/flutter_vision/versions/1.1.4.tar.gz
16+
1517
/**
1618
* @update 2025-04-15
1719
*/
@@ -23,11 +25,19 @@
2325

2426
static Source_t pl_dart_sources[] =
2527
{
26-
{&pl_dart_upstream, "https://pub.dev"},
27-
{&FlutterCN, "https://pub.flutter-io.cn"},
28-
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/dart-pub"},
29-
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"},
30-
{&Nju, "https://mirror.nju.edu.cn/dart-pub"}
28+
{&pl_dart_upstream, "https://pub.dev", DelegateToUpstream},
29+
30+
{&FlutterCN, "https://pub.flutter-io.cn",
31+
"https://pub.flutter-io.cn" PL_Dart_Pub_Speed_URL_Postfix},
32+
33+
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/dart-pub",
34+
"https://mirror.sjtu.edu.cn/dart-pub" PL_Dart_Pub_Speed_URL_Postfix},
35+
36+
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/dart-pub",
37+
"https://mirrors.tuna.tsinghua.edu.cn/dart-pub" PL_Dart_Pub_Speed_URL_Postfix},
38+
39+
{&Nju, "https://mirror.nju.edu.cn/dart-pub",
40+
"https://mirror.nju.edu.cn/dart-pub" PL_Dart_Pub_Speed_URL_Postfix}
3141
};
3242
def_sources_n(pl_dart);
3343

0 commit comments

Comments
 (0)