[BETA] Dependencies Resolver - Resolve All The required Dependencies for your Extension

:mag_right: Dependencies Resolver

Typically, Android and Java library developers publish their libraries on maven repositories (i.e: MavenCentral), and by giving out its compiled jar file. This makes it simple for developers to import the library into their projects using a java build automation system, which provides built-in capability to resolve dependencies, such as gradle or Apache maven. Unfortunately, importing libraries when developing an extension or component for MIT AppInventor or any of its distributions is limited into using its .jar file (and additionally .aar and .so library files for components).
So, using the maven artifact itself is in fact impossible, unless by collecting and downloading the dependency library file as well as all of its required dependencies one by one, which is indeed a lengthy process and could eventually result in missing libraries, causing a NoClassDefFoundError or compile errors, another option might be to download maven or gradle to build the libraries, although, getting the library files is typically not trivial, since this tools are mainly designed to build java projects, not to work as a dependency resolver.

Dependency resolver is a CLI which supports resolving and downloading dependencies given a maven artifact, without having to download them all one by one.
To learn more about downloading and running dependency resolver, please see the wiki.
This CLI is fully open source, you can find the source code on github:

This library is still under beta, it may not perform as expected in some situations, please let me know about any bugs, suggestions or feature requests by writing a post on this topic, or by opening an issue on github.
Cheers,
Mohamed Tamer

5 Likes

Great @MohamedTamer

3 Likes

Amazing :smiley: @MohamedTamer

2 Likes

A new version has been released :tada:

Version 0.3 Release Notes

Reference PR.

Whatโ€™s New

  • Implement GUI desktop application! Find out here how to run it.

  • Support Gradle Kotlin implementations

  • Implement progress reporting

Changes

  • Rename --compress flag to --merge
  • Updates code to Java 11. (Notice: Using a previous version of java when executing the CLI or GUI would fail )
  • Warn when an AAR contains resources when using --jarOnly flag

Internal Changes

  • Restructure gradle modules
  • Refactors most of the code
  • Rename packages from io.mohamed.* to io.mohamed.resolver.*

Bug Fixes

  • Fix a bug where using the -v flag with the resolve command would prints the version text.

Deprecations

  • Deprecates the --type flag, itโ€™s automatically inferred from the artifact packaging.

Cheers,
Mohamed Tamer

4 Likes

Nice @MohamedTamer :wink:

3 Likes

It is very nice update @MohamedTamer

2 Likes