KHash icon indicating copy to clipboard operation
KHash copied to clipboard

Cannot import into common source set

Open steve-the-edwards opened this issue 6 years ago • 15 comments

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?

steve-the-edwards avatar May 01 '19 19:05 steve-the-edwards

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.

mariusboepple avatar May 06 '19 10:05 mariusboepple

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

ligi avatar May 06 '19 10:05 ligi

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:

  • KBigNumbers: https://github.com/komputing/KBigNumbers/pull/4
  • KHex: https://github.com/komputing/KHex/pull/3

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.

RiccardoM avatar May 06 '19 10:05 RiccardoM

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

ligi avatar May 06 '19 10:05 ligi

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

ligi avatar May 06 '19 10:05 ligi

@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

RiccardoM avatar May 06 '19 10:05 RiccardoM

@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.

ligi avatar May 06 '19 10:05 ligi

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

mirceanis avatar May 06 '19 10:05 mirceanis

@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?

ligi avatar May 06 '19 10:05 ligi

@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"
    }

mirceanis avatar May 06 '19 11:05 mirceanis

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/

mariusboepple avatar May 06 '19 11:05 mariusboepple

@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.

mirceanis avatar May 06 '19 11:05 mirceanis

but it seems jitpack only picks up the sha3 module:

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

ligi avatar May 06 '19 11:05 ligi

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

mirceanis avatar May 06 '19 11:05 mirceanis

ah - yes you are right - 0.8 only contains SHA3

ligi avatar May 06 '19 11:05 ligi