Comments (9)
Does this occur during the build of the Java client or when building a project that depends on the built client?
from fiskaly-kassensichv-client-java.
When building the project that depends on the built client (Android)
from fiskaly-kassensichv-client-java.
I'm not sure if we can fix anything about that issue. The duplicate classes come from the OkHttp library and therefore are needed in the fat JAR.
What you could try to do tough is finding a way to exclude duplicate classes during your build. If you're using the java
plugin for Gradle then you can set the following value to exclude duplicate classes from your build:
jar {
duplicatesStrategy = 'exclude'
}
from fiskaly-kassensichv-client-java.
I asked the question on Stackoverflow :
https://stackoverflow.com/questions/58557320/android-how-to-exclude-duplicate-classes-while-importing-a-fat-jar
I'm crossing my fingers to get an answer because I'm really stuck with this problem.
from fiskaly-kassensichv-client-java.
@Greelings After a bit of research I found out about packagingOptions:
From here it reads:
Packaging options are configured with three sets of paths: first-picks, merges and excludes:
First-pick
Paths that match a first-pick pattern will be selected into the APK. If more than one path matches the first-pick, only the first found will be selected.
Merge
Paths that match a merge pattern will be concatenated and merged into the APK. When merging two files, a newline will be appended to the end of the first file, if it doesn't end with a newline already. This is done for all files, regardless of the type of contents.
Exclude
Paths that match an exclude pattern will not be included in the APK.
I don't know if this is any help or a solution for you.
Other things I thought about is using our Modules in the repo and adding those with the needed dependencies into your jar instead of using the fat jar we generate.
Hope this can help you somehow.
from fiskaly-kassensichv-client-java.
Thank you.
Other things I thought about is using our Modules in the repo and adding those with the needed dependencies into your jar instead of using the fat jar we generate.
Yes I thought about it too. Because it was working well with earlier versions of the JAR file, imported like this:
implementation files('libs/com.fiskaly.kassensichv.client.android-0.0.1-alpha.jar')
implementation 'com.squareup.okhttp3:okhttp:4.0.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
from fiskaly-kassensichv-client-java.
I tried to find a simple solution all day yesterday, but without success.
I will continue to use the old JAR file I have to be able to continue the integration, praying for you to return to a classic dependency system (at least for Android).
from fiskaly-kassensichv-client-java.
There will be more changes to the dependency systems in the next few days / weeks. Hopefully this will fix the issues in the future.
from fiskaly-kassensichv-client-java.
@prempador Perfect, thank you. Let me know when you have some news.
from fiskaly-kassensichv-client-java.
Related Issues (16)
- TokenManager: wrong call of RequestBody.create HOT 2
- Windows: Too many follow-up requests 21 HOT 11
- Exception on Android: com/fiskaly/kassensichv/sma/Sma HOT 4
- Update a transaction: querystring.last_revision should be integer HOT 6
- Size optimization HOT 2
- Crash when creating a transaction on a Samsung S4 & S5 HOT 8
- Missing com.fiskaly.kassensichv.client.android-<version>.jar for Android HOT 9
- Error on build HOT 1
- Empty certificate serial when I retrieve a transaction HOT 5
- Proguard rules HOT 4
- Impossible to generate a signed Bundle with Android Studio HOT 4
- Missing "x86" os.arch handling
- SmaLoader: On MacOS wrong libPath HOT 2
- SmaLoader: set different path for library HOT 4
- 404 when trying to finish transactions through SMA HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fiskaly-kassensichv-client-java.