flutter-china-deploy

Configure Flutter and Android build environments to use Chinese mirrors for dependencies.

2|Updated Jun 27, 2017
One-click install
npx skills add https://github.com/leafcoder/litefs --skill flutter-china-deploy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-china-deploy
Source: https://github.com/leafcoder/litefs/tree/main/.trae/skills/03_Mobile_FlutterChinaDeploy
Command: npx skills add https://github.com/leafcoder/litefs --skill flutter-china-deploy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill resolves slow dependency downloads and deployment failures for Flutter developers in China by automating the configuration of domestic mirrors and environment variables.

Core Features & Use Cases

  • Mirror Configuration: Automatically sets up PUB_HOSTED_URL and FLUTTER_STORAGE_BASE_URL to use reliable domestic mirrors.
  • Gradle Optimization: Configures Android build files to use Tencent and Aliyun Maven repositories for faster build times.
  • Use Case: When a new developer joins a project and struggles with long wait times during flutter pub get or Gradle sync, this Skill instantly applies all necessary network optimizations.

Quick Start

Use the flutter-china-deploy skill to automatically configure all environment variables and Gradle mirrors for the current project directory.

Frequently Asked Questions about flutter-china-deploy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix slow Flutter pub get downloads in China?

Fix slow Flutter pub get downloads in China by configuring the PUB_HOSTED_URL environment variable to point to a domestic mirror. This redirects dependency resolution to faster local servers.

Why does Gradle sync fail or take too long for Flutter in China?

Gradle sync fails or takes too long for Flutter in China due to network connectivity issues with default Maven repositories. Configuring build files to use Tencent or Aliyun mirrors resolves these slow download speeds.

Can I automatically set up Flutter storage base URLs for Chinese network environments?

Yes, you can automatically set up Flutter storage base URLs by running automated shell scripts. These scripts update your environment variables to ensure stable SDK downloads over Chinese networks.

What is the best way to configure Aliyun Maven repositories for Android builds?

The best way to configure Aliyun Maven repositories for Android builds is by modifying your Gradle build files. This ensures faster dependency fetching and stable build cycles for your project.

Does this mirror configuration support existing Flutter projects?

Yes, this mirror configuration supports existing Flutter projects. It applies network optimizations directly to the current project directory, instantly resolving slow dependency fetching without requiring project migration.

When should I not use domestic mirrors for Flutter deployment?

You should not use domestic mirrors for Flutter deployment if your build environment operates outside of China. Reliance on domestic mirrors may cause network timeouts or deployment failures in global CI pipelines.