Rush • A new and improved way of building extensions

lol it is no virus same with my antivirus it detected some virus i forgot name i just blacklisted the rush folder from it

: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

I am literally thankful to your rush man ! It has chaged my life :blush:

Salute to your hardwork !!! 😀

4 Likes

I was waiting for it . Finally here
Thankyou @shreyash :blush:

1 Like

Awesome Update!!!

You gave me a reason to learn Kotlin :stuck_out_tongue_winking_eye:

1 Like

It is already available starting with this release.

2 Likes

Mine gramitical mistake , I was waiting for it and finally you released it :slight_smile:

2 Likes

Hello @shreyash, is it possible to put all libs in same folder. This is not bugs but this is a disk space issue. When we create new extension directory using rush create command, rush automatically create dev-deps folder for each extension. And dev-deps folder takes about 50 MB+ space in disk. Please make a mandatory folder for rush to put dev-deps libs, not multiple folder for each extension. This is not bugs or error. This is a memory space issue. Please if possible make static folder for that.

Thanks for your time and your hard work. We respect you and your time.

2 Likes

Actually, during the last release, I accidentally shipped two copies of android.jar. It's this extra copy android.jar that's adding nearly 20 MB to the dev-deps. You can safely delete it (it goes by the name: androiddd.jar).

Talking about centralizing the dev-deps, I think it's a nice idea. But the thing that concerns me regarding this is that how IDEs (other than IntelliJ IDEA and Android Studio) would index those libraries. IntelliJ IDEA (and Android Studio) can be easily configured to index libraries outside the current project's scope but I'm afraid other IDEs (VS Code, Eclipse, etc.) can really do that.

I'd like to hear the thoughts of other community members on this. :smiley:

4 Likes

why i see this -


the size difference?

1 Like

Why am i getting this error?/
image

Same problem is defined here ,

Am i doing something wrong or is my version doesn't match with JDK version required??

As mentioned in the post you linked, Rush needs Java Development Kit (JDK) 8 to compile your extensions. You've Java Runtime Environment (JRE) 8. Download and install JDK 8 and try again.

1 Like

image

-- It says i already have installed JDK , Downloaded from
https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html


1 Like

You should run below commands in CMD and show the result:

java -version
javac - version 

Also can you show the screenshot of Path environment variable?

1 Like

After running the commands ,

image

I've installed it from PowerShell and In wiki of rush , it is said :

With PowerShell, you don't need to update the PATH environment variable manually, the script does it for you automatically.

ScreenShot of Path

1 Like

What happens if you uninstall the already installed JDK and reinstall it?

1 Like

Well, I have faced the exact issues with the current version.
Sometimes I get it to work by -r flag.

3 Likes

I deleted Rush Files and JDK , then i reinstalled it ... And it is working charm now :slight_smile:

Thankyou @shreyash and @vknow360 for your replies ...

1 Like

@oseamiya Same issue for me, always rush build fails, even blank aix

1 Like

This shouldn't really happen unless:

  • You don't have JDK installed on your system.
  • JDK's bin directory isn't on your PATH environment variable.

If that's not case, can you try reinstalling JDK 8 like @oseamiya did?

2 Likes