Git Product home page Git Product logo

albemala / package_rename Goto Github PK

View Code? Open in Web Editor NEW

This project forked from outdatedguy/package_rename

0.0 0.0 0.0 516 KB

A Blazingly Fast way to configure your Bleeding Edge flutter project to be production ready.

Home Page: https://pub.dev/packages/package_rename

License: BSD 3-Clause "New" or "Revised" License

C++ 18.83% C 1.16% Objective-C 0.03% Kotlin 0.11% Dart 61.03% Swift 1.41% HTML 1.55% CMake 15.88%

package_rename's Introduction

Package Rename

A Blazingly Fast way to configure your Bleeding Edge flutter project to be production ready.

pub package GitHub

GitHub issues GitHub issues closed


Package Rename handles changing 33 fields across 17 files on 6 platforms so you can focus on your awesome project.

For more info see list of changed fields

Getting started

Add to Dependencies

dev_dependencies:
  package_rename: ^1.5.3

Create configuration

You can create configurations by adding package_rename_config key in:

  1. Root pubspec.yaml file
  2. package_rename_config.yaml file at root of your project or a custom folder in the project

Usage

Adding Platform Specific Configurations

package_rename_config:
  android:
    app_name: # (String) The display name of the android app
    package_name: # (String) The package name of the android app
    override_old_package: # (Optional) (String) Use this to delete the old folder structure of MainActivity or to use the existing code with the new package name
    lang: # (Optional) (String) The android development language {kotlin(default) or java}

  ios:
    app_name: # (String) The display name of the ios app
    bundle_name: # (String) The bundle name of the ios app
    package_name: # (String) The product bundle identifier of the ios app

  linux:
    app_name: # (String) The window title of the linux app
    package_name: # (String) The application id of the linux app
    exe_name: # (String) The executable name (binary name) of the linux app

  macos:
    app_name: # (String) The product name of the macos app
    package_name: # (String) The product bundle identifier of the macos app
    copyright_notice: # (String) The product copyright of the macos app

  web:
    app_name: # (String) The title of the web app and PWA
    short_app_name: # (String) The short display name of the PWA (Optional, defaults to app_name if not set)
    description: # (String) The description of the web app and PWA

  windows:
    app_name: # (String) The window title & software name of the windows app
    organization: # (String) The organization name (company name) of the windows app
    copyright_notice: # (String) The legal copyright of the windows app
    exe_name: # (String) The executable name (binary name) of the windows app

For full example click here

Running Package Rename

Execute the command as per your config location:

if config file exists in either pubspec.yaml or root path:

dart run package_rename

OR

if config file exists in a custom folder:

dart run package_rename --path="path/to/package_rename_config.yaml"

or

dart run package_rename -p "path/to/package_rename_config.yaml"

Flavour Support

Package Rename supports flavours. You can add flavour specific configurations by adding flavour_name in configuration key.

package_rename_config-flavour_name:
  # ...

For full example click here

And then run the following command:

dart run package_rename --flavour=flavour_name

or

dart run package_rename -f flavour_name

With custom config file location:

dart run package_rename --flavour=flavour_name --path="path/to/package_rename_config.yaml"

Known Issues

iOS and macOS issues with PRODUCT_BUNDLE_IDENTIFIER:

The PRODUCT_BUNDLE_IDENTIFIER's in ios/Runner.xcodeproj/project.pbxproj and macos/Runner.xcodeproj/project.pbxproj have different values for different targets. Like, in my case:

DEFAULT

  • rocks.outdatedguy.packageRenameExample
  • rocks.outdatedguy.packageRenameExample.RunnerTests

EXTENSIONS

  • rocks.outdatedguy.packageRenameExample.Share-Extension
  • rocks.outdatedguy.packageRenameExample.NotificationServiceExtension
  • blah blah blah...

Hence, to properly change the PRODUCT_BUNDLE_IDENTIFIER without removing the Extension name, make sure all PRODUCT_BUNDLE_IDENTIFIER's except the DEFAULT ones are enclosed in double quotes ("").

- PRODUCT_BUNDLE_IDENTIFIER = rocks.outdatedguy.packageRenameExample.Share-Extension;
+ PRODUCT_BUNDLE_IDENTIFIER = "rocks.outdatedguy.packageRenameExample.Share-Extension";

And that's it! ๐ŸŽ‰

Now you can deploy your production ready app to change the WORLD!

If you liked the package, then please give it a Like ๐Ÿ‘๐Ÿผ and Star โญ

package_rename's People

Contributors

outdatedguy avatar albemala avatar obemu avatar imranspahic avatar milindgoel15 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.