komputing / KHash

Different hash functions in Kotlin (SHA3 with Keccak and Shake variants, sha256, ripemd160)
MIT License
54 stars 10 forks source link

Cannot import into common source set #14

Open steve-the-edwards opened 5 years ago

steve-the-edwards commented 5 years ago

I have successfully pulled the jitpack.io dependency into my project, but release 0.8 seems to have no linkable source? Screen Shot 2019-05-01 at 3 04 01 PM

See the above for the successful gradle import. I have no org.komputing package or files though?

mariusboepple commented 5 years ago

I am having the same problem on Android when adding the following to my gradle file

implementation "com.github.komputing:KHash:0.8"

Furthermore it may be helpful to have an example in the README how to import only some modules.

ligi commented 5 years ago

thanks for the report - I guess this has to do with the multi-platform changes and you need to add a jvm - hope @RiccardoM can have a look here

RiccardoM commented 5 years ago

Hi @steve-the-edwards and @MariusBoepple, thanks for opening this issue.

Currently, I'm working on making this project fully multiplatform compliant, but I need some of the other PRs to be merged first on other projects:

Once those projects have been made available for multiplatform, I will make this project multiplatform compliant too.

Until then, the versions up to 0.8 are not multiplatform.

The first version that will implement the changes will be the 1.0.0-RC1.

It should be a matter of days now. Sorry for the inconvenience.

ligi commented 5 years ago

but as far as I see they do not need multiplatform - just JVM

ligi commented 5 years ago

really confused now - your PR https://github.com/komputing/KHash/pull/7 introduced multiplatform and I think also introduced the problem with JVM the reporters have

RiccardoM commented 5 years ago

@ligi You're right, I've misread the posts.

Having a look inside the Jitpack build.log for version 0.8 it seems that everything has worked fine.

Probably, the problem is that they are trying to use the repository as follows

implementation "com.github.komputing:KHash:0.8"

while it should be

implementation "com.github.komputing:Khash:0.8"

(Note the lowerchase h on KHash instead of it being uppercase).

This is due to Jitpack being case-sensitive

ligi commented 5 years ago

@RiccardoM thanks for looking into this. I would expect another failure for the case sensitivity (artifact not found) - but perhaps this is really the issue - waiting for the reporters to deny or confirm. I can also look into the problem later this week as I also need to migrate from walleth/sha3 to komputing/KHash - just did not come around to it and it has no priority for me as there are no content changes for me between these versions.

mirceanis commented 5 years ago

I can also look into the problem later this week as I also need to migrate from walleth/sha3 to komputing/KHash - just did not come around to it and it has no priority for me as there are no content changes for me between these versions.

@ligi please see https://github.com/komputing/KEthereum/pull/66

ligi commented 5 years ago

@mirceanis thanks - looking at it currently - looks good - just need to test it a bit - but this means you could use KHash 0.8 in a JVM context?

mirceanis commented 5 years ago

@ligi yes. It is used by a JVM lib that passes tests and that lib is used in an android context which also passes tests.

I had to exclude the old walleth maven coordinates though, otherwise there are duplicate class errors in the android build:

implementation("com.github.komputing:KHash:$khash_version") {
        exclude group: "com.github.walleth"
    }
mariusboepple commented 5 years ago

With implementation "com.github.komputing:Khash:0.8" I'm still just getting

khash

They both look similar: https://jitpack.io/com/github/komputing/Khash/0.8/ https://jitpack.io/com/github/komputing/KHash/0.8/

mirceanis commented 5 years ago

@MariusBoepple I see the same thing in AndroidStudio but I am able to CMD+click(CTRL+click) on a call to calculateSHA3() in my code and see the implementation.

ligi commented 5 years ago

but it seems jitpack only picks up the sha3 module:

https://jitpack.io/com/github/komputing/KhasH/0.8/build.log

mirceanis commented 5 years ago

but it seems jitpack only picks up the sha3 module:

https://jitpack.io/com/github/komputing/KhasH/0.8/build.log

I just assumed that was the only one available in 0.8. I didn't follow the history of this repo too closely

ligi commented 5 years ago

ah - yes you are right - 0.8 only contains SHA3