Open aberaud opened 2 years ago
See the ChangeLog: https://raw.githubusercontent.com/j256/ormlite-core/master/src/main/javadoc/doc-files/changelog.txt
In 6.0 we migrated all of the core classes into the JDBC and Android versions:
* JDBC: ormlite-jdbc jar now includes the -core classes. No need to import ormlite-core jar anymore.
* ANDROID: ormlite-android jar now includes the -core classes. No need to import ormlite-core jar anymore.
Thanks for the reply, however the dependency is not an Android dependency but a pure Java/kotlin dependency, so it can't/shouldn't use the Android package.
What to do in that case ? Thanks.
@j256 Any idea? This issue prevents us from migrating to ORMLite 6.x
Why not declaring a dependency from ormlite-android
to ormlite-core
, instead of including all ormlite-core
classes in ormlite-android
, which seems odd?
Frankly I didn't foresee this issue. I never thought that someone would ever want to depend on both of them. Not everyone uses maven or gradle or some other dependency management system that would automatically pull in jars so it was an attempt to make it easier for folks.
Maybe I should consider rolling that back even though it is going to be painful.
How to solve it?
You just have to exclude the duplicated libraries in gradle like so:
implementation('org.osmdroid:osmdroid-geopackage:6.1.x') {
exclude group: 'org.osmdroid.gpkg'
exclude module: 'ormlite-core'
exclude group: 'com.j256.ormlite'
}
Our Android project uses
ormlite-android
and depends on another project that usesormlite-core
.The base dependency includes ormlite with:
implementation ("com.j256.ormlite:ormlite-core:6.1")
And the Android project includes ormlite with:
implementation ("com.j256.ormlite:ormlite-android:6.1")
When building the Android project, we get the following errors:
This was working fine with Ormlite 5.x