-
Notifications
You must be signed in to change notification settings - Fork 26
Migrate command
The migrate command lets you migrate your old extensions (currently, only the ones built using MIT's extension template) to Rush. No matter how big your extension is, it'll migrate it in just a few seconds.
To migrate your extension built using the extension template follow the below steps:
- Install Rush.
- Fire up your terminal and
cd
into the extension template's root directory (the directory in which thesrc
directory and thebuild.xml
file are situated). - Then run
rush migrate
and let Rush do the hard work. - If the migration fails, there are likely some errors in your extension source file. Fix them and re-run
rush migrate
. - If the build succeeds, congrats! Your extension is now migrated to Rush and can be found in one directory up with the same as your extension.
- The last thing you need to do now is to open your extension's Java file in the newly created Rush project and remove the annotations and imports that Rush doesn't support (like,
@DesignerComponent
,@SimpleObject
,@UsesPermissions
,@UsesAssets
, etc).
-
Can I migrate more than one extension at a time?
👉 Currently, no. The migration will fail if you've more than one extension in the extension template. In the future, it might be possible to do this. -
Why do I get the "No extension found" error?
👉 Most likely, as the error says, Rush was unable to find any extension in thesrc
directory of your extension template. But if you are sure that there's an extension in thesrc
directory, start a new discussion here and we will try to find out what's the issue. -
Why am I unable to build the migrated extension?
👉 Did you removed the unsupported annotations from your extension's source file? Here's a list of unsupported AI2 annotations:-
Replaced by
rush.yml
@SimpleObject
@DesignerComponent
@UsesAssets
@UsesLibraries
-
Replaced by
AndroidManifest.xml
@UsesPermissions
@UsesActivities
@UsesActivityMetaData
@UsesApplicationMetaData
@UsesBroadcastReceivers
@UsesContentProviders
@UsesPermissions
@UsesServices
-
Miscellaneous
@IsColor
@SimplePropertyCopier
-