awxkee / avif-coder

AVIF/HEIC coder for Android, Kotlin, Java
MIT License
67 stars 7 forks source link

Jitpack #7

Closed T8RIN closed 1 year ago

T8RIN commented 1 year ago

By some reason image and i even can't get it from gradle :(

T8RIN commented 1 year ago

Maybe that's because i suddenly removed publishing plugin from gradle script...

T8RIN commented 1 year ago

1.0.23 still fails (

awxkee commented 1 year ago

1.0.23 still fails (

I think it will be at least ten more fails :)

T8RIN commented 1 year ago

24 built fine :)

awxkee commented 1 year ago

24 built fine :)

Try out I think it's done

T8RIN commented 1 year ago

24 built fine :)

Try out I think it's done

will check now

T8RIN commented 1 year ago

Works, but i have this error image

T8RIN commented 1 year ago

That's the reason why i copied the source and added this to avif-coder build gradle

 packaging {
        jniLibs {
            excludes.add("lib/*/liblog.so")
            useLegacyPackaging = false
            keepDebugSymbols.clear()
        }
    }
awxkee commented 1 year ago

I think it's your local problem

awxkee commented 1 year ago

Try clean gradle cache. Have a look on your paths, your project accidently imports two same named libraries from different paths

awxkee commented 1 year ago

Make pickFirst / pickLatest strategy or find out why you importing one library two times simultaneously

T8RIN commented 1 year ago

Try clean gradle cache. Have a look on your paths, your project accidently imports two same named libraries from different paths

Nothing helps, only this packaging block, because gpuimage local module creates it too (

T8RIN commented 1 year ago

Make pickFirst / pickLatest strategy or find out why you importing one library two times simultaneously

ll try now

awxkee commented 1 year ago

You're definitely mixing up something. GPU image produces libyuv-decoder.so library

awxkee commented 1 year ago

If you has cloned my avif and have a sub project then you imports somewhere remote avif-coder and local avif-coder at the same time: They producing the same files and it fails

awxkee commented 1 year ago

I build lib locally from jitpack. It absolutely your local problem

T8RIN commented 1 year ago

If you has cloned my avif and have a sub project then you imports somewhere remote avif-coder and local avif-coder at the same time: They producing the same files and it fails

Let me explain, i have different product flavors, on is FOSS and there i need your remote dependency, and i has market flavor where i use modified cloned module

T8RIN commented 1 year ago

Make pickFirst / pickLatest strategy or find out why you importing one library two times simultaneously

this one helped! image thanks :)

awxkee commented 1 year ago

Fine, why don't do 'fossImplementation 'remote avif''debugImpleementation 'local-avif' 'releaseImplementation ?

awxkee commented 1 year ago

Make pickFirst / pickLatest strategy or find out why you importing one library two times simultaneously

this one helped! image thanks :)

Better do the right imports because it' quite gold hammer strategy for your case

T8RIN commented 1 year ago

Fine, why don't do 'fossImplementation 'remote avif''debugImpleementation 'local-avif' 'releaseImplementation ?

image

using that way

awxkee commented 1 year ago

Okay. Then double check that you don't have cycling deps because this one should works well if you didn't do the cycle

awxkee commented 1 year ago

Maybe one more project exporting same project?

T8RIN commented 1 year ago

Definitely no, because they are not rely on each other, but maybe i didn't get something :(

awxkee commented 1 year ago

Definitely no, because they are not rely on each other, but maybe i didn't get something :(

If you cloned the project it this possible that avif-coil depends on avif-coder?

T8RIN commented 1 year ago

Also, can i request only one addition to heif coder please?

image

Could you add this dummy check? Because my app uses api 21 and on older than 24 i close avif using on client side, so all is fine, but if this check not here app crashes :(

T8RIN commented 1 year ago

If you cloned the project it this possible that avif-coil depends on avif-coder?

Yes, it is, i will exlude now

awxkee commented 1 year ago

Also, can i request only one addition to heif coder please?

image

Could you add this dummy check? Because my app uses api 21 and on older than 24 i close avif using on client side, so all is fine, but if this check not here app crashes :(

I may give you the general recommendation never do this way :)

But if it is necessary your app should handle as I remember not an ancestor of Exception but an ancestor of Error. Generally speaking you should be able to intercept this error you will catch the right ancestor of error.

T8RIN commented 1 year ago

Also, can i request only one addition to heif coder please? image Could you add this dummy check? Because my app uses api 21 and on older than 24 i close avif using on client side, so all is fine, but if this check not here app crashes :(

I may give you the general recommendation never do this way :)

But if it is necessary your app should handle as I remember not an ancestor of Exception but an ancestor of Error. Generally speaking you should be able to intercept this error you will catch the right ancestor of error.

But if i use your remote dependency i can't handle system crash if user has lower api, because init block just happens

awxkee commented 1 year ago

Ok. But actually I don't remember why I chose 24 as a minimum give me some time to check maybe I may just compile for 21 all the libs

T8RIN commented 1 year ago

Ok. But actually I don't remember why I chose 24 as a minimum give me some time to check maybe I may just compile for 21 all the libs

i'll wait for the updares then :)

awxkee commented 1 year ago

Ok. But actually I don't remember why I chose 24 as a minimum give me some time to check maybe I may just compile for 21 all the libs

i'll wait for the updares then :)

No, no way. Only if remove heic with heif support then possible. But check is already added. It should be in 1.0.24 release. Is it not enough?

T8RIN commented 1 year ago

Also, can i request only one addition to heif coder please? image Could you add this dummy check? Because my app uses api 21 and on older than 24 i close avif using on client side, so all is fine, but if this check not here app crashes :(

I may give you the general recommendation never do this way :)

But if it is necessary your app should handle as I remember not an ancestor of Exception but an ancestor of Error. Generally speaking you should be able to intercept this error you will catch the right ancestor of error.

But if i use your remote dependency i can't handle system crash if user has lower api, because init block just happens

You mean this one?

awxkee commented 1 year ago

Also, can i request only one addition to heif coder please? image Could you add this dummy check? Because my app uses api 21 and on older than 24 i close avif using on client side, so all is fine, but if this check not here app crashes :(

I may give you the general recommendation never do this way :) But if it is necessary your app should handle as I remember not an ancestor of Exception but an ancestor of Error. Generally speaking you should be able to intercept this error you will catch the right ancestor of error.

But if i use your remote dependency i can't handle system crash if user has lower api, because init block just happens

You mean this one?

Yes, that one

image
T8RIN commented 1 year ago

Also, can i request only one addition to heif coder please? image Could you add this dummy check? Because my app uses api 21 and on older than 24 i close avif using on client side, so all is fine, but if this check not here app crashes :(

I may give you the general recommendation never do this way :) But if it is necessary your app should handle as I remember not an ancestor of Exception but an ancestor of Error. Generally speaking you should be able to intercept this error you will catch the right ancestor of error.

But if i use your remote dependency i can't handle system crash if user has lower api, because init block just happens

You mean this one?

Yes, that one

image

Yup, it is enough, thanks!

T8RIN commented 1 year ago

I have another problem, again...

when trying to exclude transitive copy of avif-coder i get this error

implementation(project(":avif-coder-coil")) {
        isTransitive = false
    }
Cannot change dependencies of dependency configuration ':avif-coder-coil:api' after it has been included in dependency resolution.

but when i try to not exclude i get duplicate classes packaged into jar (

awxkee commented 1 year ago

It won't work this way. You have to do related Flavors as in main project for you subproject too. But this is quite annoying and in fact I recommend you just delete avif-coder-coil and copy this one file from it to the root.

T8RIN commented 1 year ago

It won't work this way. You have to do related Flavors as in main project for you subproject too. But this is quite annoying and in fact I recommend you just delete avif-coder-coil and copy this one file from it to the root.

Okay, and also there is problem with coil remote dependency: Could not GET 'https://jitpack.io/com/github/awxkee/avif-coder-coil/1.0.24/avif-coder-coil-1.0.24.pom'. Received status code 401 from server: Unauthorized

awxkee commented 1 year ago

Surpringly but jitpack doesn't work this way. It squashes all projects that provides publishing into one. After you added avif-coder all classes from coil framework should be visible too

T8RIN commented 1 year ago

Surpringly but jitpack doesn't work this way. It squashes all projects that provides publishing into one. After you added avif-coder all classes from coil framework should be visible too

:)))))))))) gradle gonna kill me soon

T8RIN commented 1 year ago

It won't work this way. You have to do related Flavors as in main project for you subproject too. But this is quite annoying and in fact I recommend you just delete avif-coder-coil and copy this one file from it to the root.

Okay, and also there is problem with coil remote dependency: Could not GET 'https://jitpack.io/com/github/awxkee/avif-coder-coil/1.0.24/avif-coder-coil-1.0.24.pom'. Received status code 401 from server: Unauthorized

and what is it also?

awxkee commented 1 year ago

It won't work this way. You have to do related Flavors as in main project for you subproject too. But this is quite annoying and in fact I recommend you just delete avif-coder-coil and copy this one file from it to the root.

Okay, and also there is problem with coil remote dependency: Could not GET 'https://jitpack.io/com/github/awxkee/avif-coder-coil/1.0.24/avif-coder-coil-1.0.24.pom'. Received status code 401 from server: Unauthorized

and what is it also?

Jitpack provides only one source of truth - the main packaga name that correlates to github proj name so for avif-coder it is implementation 'com.github.awxkee:avif-coder:Tag where all projects from avif-coder squashed into it. And other endpoint means unexisting or "you have no rights" for privacy reasons.

For existing this endpoint I must created project name avif-coder-coil and do all the stuff there...

T8RIN commented 1 year ago

ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

T8RIN commented 1 year ago

Got it, i removed coil dependency for foss image now it builds :)

awxkee commented 1 year ago

Well done

T8RIN commented 1 year ago

Thanks for your support and answers!!