Game Framework
Migration

Migrating from pub.dev

Move your packages from pub.dev to Game Framework private registry.

Why Migrate?

  • Privacy - Keep packages private
  • Access Control - RBAC for team members
  • Usage Tracking - Monitor downloads
  • Compliance - Audit logs and certifications

Migration Strategy

Option 1: Full Migration

Move all packages to private registry.

Option 2: Hybrid Approach

Keep public packages on pub.dev, private ones on Game Framework.

Option 3: Dual Publishing

Publish to both registries (for open source + private).

Migration Steps

Inventory Packages

List all packages to migrate:

# List your pub.dev packages
flutter pub global activate pubspec_manager
pubspec_manager list

Update pubspec.yaml

Change publish_to:

# Before
publish_to: https://pub.dev  # or no publish_to

# After
publish_to: https://registry.yourcompany.com

Publish to Game Framework

flutter pub publish --server=https://registry.yourcompany.com

Update Dependents

Update all projects using the package:

dependencies:
  my_package:
    hosted:
      name: my_package
      url: https://registry.yourcompany.com
    version: ^1.0.0

Deprecate on pub.dev (Optional)

If package was public, mark as deprecated:

# README.md on pub.dev
## DEPRECATED

This package has moved to our private registry.
Contact us for access.

Dual Publishing

Publish to both registries:

# Publish to Game Framework
flutter pub publish --server=https://registry.yourcompany.com

# Publish to pub.dev (if still needed)
flutter pub publish

Tip: Use CI/CD to automate dual publishing.

Migration Checklist

  • List all packages
  • Update pubspec.yaml files
  • Publish to Game Framework
  • Update dependent projects
  • Test installations
  • Update documentation
  • Notify team members
  • Deprecate pub.dev versions (if applicable)

Common Issues

Version Conflicts

If same version exists on both registries:

# Force specific registry
dependencies:
  package:
    hosted:
      name: package
      url: https://registry.yourcompany.com
    version: ^1.0.0

Mixed Dependencies

Some dependencies on pub.dev, some private:

dependencies:
  # Private
  my_private:
    hosted:
      name: my_private
      url: https://registry.yourcompany.com
    version: ^1.0.0
  
  # Public
  http: ^1.1.0  # Still from pub.dev

Next Steps