Rush • A new and improved way of building extensions

:sparkles: Rush 1.2.0 :sparkles:


What's new :eyes:


  • Kotlin Language -- The most awaited Kotlin language support has finally landed! You can now:

    • Write your extensions in pure, idiomatic Kotlin
    • Use libraries written in Kotlin, in new or existing extensions
    • Interop Kotlin in your existing extensions

    Learn more, here.

  • Java 8 Language Features -- Ever missed those handy lambda expressions when writing extensions? Not anymore, because with Rush 1.2.0 you get access to a bunch of Java 8 language features. You got yet another reason to completely switch to Rush!

  • Upgrade Command -- This is the last time that you will have to re-install Rush in order to upgrade it. With the addition of the upgrade command, you will now be able to install all the future releases simply by running rush upgrade.

  • Markdown Support for extension description -- Rush now lets you format your extension's description with Markdown! Here is an example:

    description: |
      **This text is BOLD**
      *And this one italic*
      # Did someone asked for a headline?
      Oh, btw, [links](https://github.com) are also there!
    
  • IDE support for Metadata file -- Yes, you can now enjoy the IntelliSense features like auto-completion and syntactical error reporting in your Java IDE! Check out how to enable that, in IntelliJ IDEA, Android Studio, and VS Code, here.

Bug fixes :beetle:


  • Previously, if you tried to build an extension with no blocks, Rush would crash. This is now fixed and instead of crashing, Rush will now warn you about it and move on.

  • Fixed the inconsistent behavior of YAML multiline strings as reported here. All the following snippets should now show the exact same result:

    description: |
      This is a multi-
      line description!!!
    ---
    description: This is a multi-<br>line description!!!
    ---
    description: "This is a multi-\nline description!!!"
    
  • Sometimes, build warnings would get misinterpreted as errors. This is now fixed.

  • Earlier on Linux and macOS, while processing the extension, Rush would fail to produce AndroidRuntime.jar in some rare scenarios. This is no longer the case.

  • Fixed the issue where the extensions migrated from the extension template won't build if they previously had no icon image.

Improvements :nail_care:


  • Terminal-UI
    • The bright white color, which was used almost everywhere, is now changed to your terminal's color. It had problems with adapting to some terminal themes, making it too bright (on dark themes) or almost illegible (on light themes).

    • Error and warning messages are no longer printed in all red and yellow colors respectively. This makes them more legible on dark terminal themes.

      Old New
    • After the build finishes, the total number of errors and warnings is printed beside the success/failure message.

Deprecations :skull:


  • release field in the metadata file -- The release field is now deprecated and is replaced by the build.release field.

    # ⚠ This is deprecated 
    release:
      optimize: true
    
    # ✔ Use this instead 
    build:
      release:
        optimize: true
    
  • license_url field in the metadata file -- The license_url field is not deprecated and is replaced by the license field which accepts both URL and local file path.

    # ⚠ This is deprecated 
    license_url: "https://example.com/license"
    
    # ✔ Use this instead 
    license: "https://example.com/license"
    
  • Rush Installer -- The Rush installer (rush-init) is now deprecated. Instead, users can now install Rush using one-line shell commands (read the below section).

Installation :hammer_and_wrench:


You can now install Rush simply by running the following one-line commands from the appropriate shells, no need to download the Rush installer. Also, PowerShell users (only) don't need to manually update their PATH environment variable, the script automatically updates it!

Using PowerShell (Windows only)

iwr https://raw.githubusercontent.com/shreyashsaitwal/rush-cli/main/scripts/install/install.ps1 -useb | iex

Using Bash

curl https://raw.githubusercontent.com/shreyashsaitwal/rush-cli/main/scripts/install/install.sh -fsSL | bash

Feedback :speaking_head:


A lot (literally, a lot) of work has gone into this release. I would love to hear your feedback on the new features and improvements introduced in this release. Also, it's no surprise that with all these changes, some pesky bugs might have found their way into the codebase. So, let's find them and help make Rush better, for the better!


Cheers,
Shreyash

8 Likes