Legacy-Repo-Migrator:基于多技术生态的遗留项目迁移工具包

存量项目迁移工具: Android2KMP, Android2ArkTs

Branch1Tags0

Legacy Repo Migrator

Legacy Repo Migrator is a toolkit for migrating existing application projects to modern cross-platform targets with high fidelity. The current focus is migrating legacy Android projects to Kotlin Multiplatform (KMP), while the roadmap includes Android-to-ArkTS migration for HarmonyOS ecosystems.

Why This Repo Exists

Real-world legacy project migration is rarely a simple syntax conversion. Mature mobile applications usually contain years of accumulated product behavior, platform-specific UI, build logic, resource conventions, navigation flows, local persistence, network contracts, and edge-case handling. Rebuilding all of that manually is slow, risky, and hard to validate.

This repository aims to make migration more systematic by combining project understanding, migration planning, code generation, parity review, and validation workflows.

Migration Challenges

Common pain points this project is designed to address include:

  • Incomplete understanding of legacy architecture, data flow, control flow, and screen ownership.
  • UI reconstruction gaps between XML, Android Views, Jetpack Compose, and target cross-platform UI frameworks.
  • Platform API differences across Android, KMP, ArkTS, and related runtime environments.
  • Resource migration complexity, including themes, dimensions, drawables, strings, fonts, and localized assets.
  • Navigation and state-management differences between the source app and target architecture.
  • Business logic hidden inside Activities, Fragments, adapters, custom views, and platform callbacks.
  • Validation difficulty when the migrated app must preserve existing behavior, visual fidelity, and integration contracts.
  • High manual review cost when large codebases are migrated feature by feature.

Value

Legacy Repo Migrator provides value by:

  • Producing structured understanding artifacts before migration, including PRD, design, plan, and verification documents.
  • Turning migration work into repeatable workflows rather than one-off manual rewrites.
  • Preserving user-facing behavior, UI structure, navigation intent, and business logic wherever possible.
  • Supporting incremental migration by project, module, feature, or screen.
  • Enabling validation loops for build health, behavior parity, and UI fidelity.
  • Helping teams reduce migration uncertainty and make large modernization efforts easier to review.

Current Status

The repository currently supports legacy Android project analysis and Android-to-KMP migration workflows.

Current capabilities include:

  • Android project understanding across UI, architecture, resources, APIs, data flow, and control logic.
  • SPEC artifact generation for migration planning and review.
  • Android-to-KMP migration orchestration.
  • Post-migration validation for KMP output.
  • Agent-based workflows for analysis, migration, validation, memory maintenance, and skill maintenance.

See kmp-migration/README.md for the current KMP migration plugin details.

Roadmap

Planned directions include:

  • Improve Android-to-KMP migration fidelity across more UI patterns, platform APIs, and project structures.
  • Expand validation coverage for generated KMP projects.
  • Add Android-to-ArkTS migration planning and implementation workflows.
  • Build reusable migration adapters for common Android libraries and platform services.
  • Support richer reports for migration risk, feature parity, and manual follow-up work.
  • Enable partner-contributed migration strategies for additional frameworks and target platforms.

Partner Co-Building

We welcome partners who want to co-build migration capabilities with us. Practical collaboration models include:

  • Source project pilots: provide representative legacy projects or modules so migration workflows can be tested against real-world complexity.
  • Target platform adapters: contribute mappings for platform APIs, UI components, navigation, resources, persistence, networking, or build tooling.
  • Migration rules and playbooks: document repeatable migration patterns for specific frameworks, libraries, or business domains.
  • Validation cases: contribute screenshots, behavior test cases, build checks, and acceptance criteria for migrated output.
  • Engineering collaboration: work together on feature branches, implementation reviews, migration reports, and regression fixes.
  • Ecosystem integration: integrate the toolkit into internal migration platforms, CI pipelines, IDE plugins, or partner delivery workflows.

If you are interested in co-building, start by opening an issue or discussion describing the source platform, target platform, project scale, migration goals, and the type of collaboration you want to pursue.

License

This project is released under the MIT License.

Introduction

存量项目迁移工具: Android2KMP, Android2ArkTs

Customize your domain