Rush • A new and improved way of building extensions


Done :+1:

P.S:
:joy: Its good though, don't mind...

PS C:\Users\Harish> rush --version
                      __
     _______  _______/ /_
    / ___/ / / / ___/ __ \
   / /  / /_/ (__  / / / /
  /_/   \__,_/____/_/ /_/

Version:   1.2.4
Built on:  2021-12-11 06:56:51
PS C:\Users\Harish>

dear @shreyash please see this...
am I doing something wrong


Please see this

If you are having issues selecting the extension's language, try defining it when running the create command. Like this:

rush create extension-name --lang Kotlin

You can do the similar thing with other options as well.

--org,     -o     For organization name
--version, -v     For version name
--author,  -a     For author name
1 Like

Thank you @shreyash

After instalation of Rush i have tries to make "Your first Rush project"
it failed:
Build initialized

┌ Checking project files
│ info Checking metadata file (rush.yml)
│ info Checking AndroidManifest.xml file
└ done
┌ Compiling source files
│ info Picked 1 source file
└ failed

• Build failed [15ms] []
What was wrong with my installation?

Hi,
Please read this:

1 Like

Hello @shreyash

Is it possible to add the class UsesService to annotations.jar to make this line work?:

import com.google.appinventor.components.annotations.UsesServices;

Hi,

You can import that class by adding the original AndroidRuntime.jar from the AI2 extension template as your extension's compile-time dependency. In Rush, to add any JAR as a compile-time dependency, just add it inside the deps directory but don't include it in the rush.yml file.

PS: You can get the AndroidRuntime.jar from here: https://github.com/mit-cml/extension-deps/blob/master/AndroidRuntime.jar

That worked, thanks @shreyash.

1 Like

#Off Topic

What is the meaning of this :sweat_smile::sweat_smile:

From Latin: "Post Scriptum" - After written

3 Likes

#offtopic

P.S. is a footnote. It includes additional information.

2 Likes

It can be used with some more variations

Here @ABG has used some programming skills and applied nesting with "Post Script".

P.S., P.P.S., P.P.P.S... :smiley:

Edit: Pls read this Post as #offtopic

2 Likes

My Rush build is failing again and again.

While i understand that in my profile i have space but how do I ignore the same. "C:\users\amrish shah".

How doi ignore space while building / compiling.

┌ Checking project files
│ info Checking metadata file (rush.yml)
│ info Checking AndroidManifest.xml file
└ done
┌ Compiling sources
│ info Picked 1 source file
│ erro invalid flag: Shah\AppData\Roaming\rush\workspaces\io.amrish.test\classes
│ Usage: javac
│ use --help for a list of possible options
└ failed

This is a known bug and will be fixed in a future release. Until then, try this workaround:

  1. Copy/Move everything inside the Rush data directory (located at C:\Users\amrish shah\AppData\Roaming\rush) to a place whose path has no whitespace, for e.g., C:\rush.
  2. Then, create a new environment variable named RUSH_DATA_DIR and set it equal to the path of the new data directory.
  3. Build your extension with rush build.
1 Like

@shreyash i am using your rush since long... but these days i am encountering an error while using proguard in rush

while i dont have any argument in my simple event

@SimpleEvent
  public void OnInitialised(){
    EventDispatcher.dispatchEvent(this,"OnInitialised");
  }

Also when i remove proguard extension works fine

My proguard file code:-

# Add any ProGuard configurations specific to this
# extension here.

-keep public class in.akshatt.UnityAds.UnityAds {
    public *;
 }
-keeppackagenames gnu.kawa**, gnu.expr**

-optimizationpasses 4
-allowaccessmodification
-mergeinterfacesaggressively

-repackageclasses 'in/akshatt/UnityAds/repack'
-flattenpackagehierarchy
-dontpreverify

#by me :)

-keepattributes SourceFile,LineNumberTable


-keepattributes JavascriptInterface


-keep class android.webkit.JavascriptInterface {
   *;
}


-keep class com.unity3d.ads.** {
   *;
}

-keep class com.unity3d.services.** {
   *;
}

-dontwarn com.google.**
-dontwarn com.unity3d.**

2 Likes

And @shreyash please make it usable for Git Bash too
Means creating extension using Git Bash

It doesn't look like it has anything to do with ProGuard. Is this extension being tested in the companion? If yes, make sure that you restart the companion connection every time you make changes in the extension. In some cases, you might even need to delete the companion's directory from your Android device.

Seems like the issue doesn't have to do with the intialization of the method itself, but rather from where you call the method. Could you please send that?

I tested it both in companion and real apk and results are same
.. but as i said...

by this reason i am suspecting proguard

1 Like