unity-jar-resolver icon indicating copy to clipboard operation
unity-jar-resolver copied to clipboard

Option to exclude "alpha" versions?

Open pt5011 opened this issue 7 years ago • 2 comments

Hi, First of all thanks for the nice plugin. Can you add the ability to prevent the resolver from downloading alpha versions, especially when some dependency was specified with 'LATEST' as the required version? For example, Google is now rolling out version 28.0.0-alpha1 of the support library, and the resolver keeps downloading and importing it to my Unity project (some 3rd party plugin must have specified 'LATEST' support library in their dependencies). Thing is these alpha files keep generating build errors with Unity's integrated Gradle system, for example:

No resource found that matches the given name (at 'dialog CornerRadius' with value '?android:attr/dialogCornerRadius')

These errors are likely to be fixed when Google release the stable artifacts in the near future, but in the mean time, they're a real pain. My current workaround is disable automatic resolving, and manually replace the alpha libraries with stable working ones from other projects. This is far from ideal because I would need to repeat the process every time a resolving is needed (e.g. when importing a new 3rd party plugin to the project I need to make sure its dependencies are resolved properly).

It would be nice to have an option to exclude all alpha version from the resolving process. Thanks again!

pt5011 avatar Mar 20 '18 08:03 pt5011

Hi @pt5011 , unfortunately at the moment you'll need to explicitly specify which versions of AARs you need to include to prevent this from happening. If a plugin is specifying LATEST you'll need to change their dependency specification (XML or code) to pin to a particular version of the AAR.

If you wanted to add a feature that enabled per-project specification of AAR / JAR dependencies (wow that would be neat), we would really appreciate it :) e.g https://github.com/googlesamples/unity-jar-resolver/issues/54 proposed some ideas for UI.

Cheers, Stewart

stewartmiles avatar Mar 20 '18 16:03 stewartmiles

@stewartmiles today,i use it resolve ,download version 12.0.0 ,although in my Dependencies.xml specify 11.8.0,but 12.0.0 has a bug like this:https://github.com/evollu/react-native-fcm/issues/857

so,i hope a specify version in your setting panel,only a highest version setting,it will resolve all Dependencies version but lower than specify highest version in setting, i think it is simple for u,tks

sunxinzhe2012 avatar Mar 22 '18 08:03 sunxinzhe2012