vt-middleware / passay

Password policy enforcement for Java.
http://www.passay.org
Other
277 stars 63 forks source link

Android usage problematic in 1.2.0 #60

Closed skolson closed 7 years ago

skolson commented 7 years ago

Been using 1.1.0 in Android for almost a year now no problem. Tried to change to 1.2.0, and got an interesting build failure:

Error:Caused by: com.android.dx.cf.iface.ParseException: invokedynamic not supported
Error:  at com.android.dx.cf.code.BytecodeArray.parseInstruction(BytecodeArray.java:777)
Error:  ... 16 more
Error:...at bytecode offset 0000002e
Error:...while working on method validate:(Lorg/passay/PasswordData;)Lorg/passay/RuleResult;
Error:...while processing validate (Lorg/passay/PasswordData;)Lorg/passay/RuleResult;
Error:...while processing org/passay/HistoryRule.class
Error:Execution failed for task ':app:transformClassesWithDexBuilderForTestDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.builder.utils.FileCache$FileCreatorException: com.android.builder.dexing.DexArchiveBuilder$DexBuilderException: Unable to convert input to dex archive.

Downgraded back to 1.1. I didn't try to research whats new in 1.2.0 that causes this error, which I've never seen caused by anything else before :-) Sorry...

Also FYI Cryptacular is problematic on Android, causing a different error. But since I don't use anything in it, I have to exclude it in gradle to get a good build with 1.1. See the last comment on issue 41.

dfish3r commented 7 years ago

Do you see the same issue on the 1.3.0 snapshot?

dfish3r commented 7 years ago

Potentially fixed in https://github.com/vt-middleware/passay/commit/cff7dbc64fc94fd1a60f6da46de89bae9ad03900

skolson commented 7 years ago

Sorry for the delay, I'm just now seeing this. I am up for trying 1.3.0 snapshot in my build, but am unsure where to get it using Gradle. Is there a different repository location holding 1.3.0 snap? Or would I need to do a local build from git? At the repository location I'm using - https://mvnrepository.com/artifact/org.passay/passay - it only shows 1.1.0 and 1.2.0

FYI am currently using Gradle 4.1 milestone and Android Studio canary 6, both not official releases yet. But so far the build process has been solid, so hopefully will be an informative test if 1.3 works. I will try without explicitly excluding cryptacular, and if that doesn't work, will try with the same exclude I'm doing now, and see if that works ok.

Also, the project build I'll be testing with uses Bouncycastle 1.57 for stuff unrelated to Passay.

If it's still useful for me to try, lemme know, otherwise I'll just wait until 1.3.0 comes out. Thanks!

On Tue, Jul 11, 2017 at 12:47 PM, Daniel Fisher notifications@github.com wrote:

Do you see the same issue on the 1.3.0 snapshot?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vt-middleware/passay/issues/60#issuecomment-314551649, or mute the thread https://github.com/notifications/unsubscribe-auth/AS4xzDYqnYuIhIYkSax1RamaDkS38IYvks5sM9FFgaJpZM4N9D5R .

dfish3r commented 7 years ago

We publish snapshots here: https://github.com/vt-middleware/maven-repo But you can always build and install locally.