pdvrieze/xmlutil

Android Project - Failed to resolve: io.github.pdvrieze.xmlutil:core-base:0.90.0-RC3

tagy opened this issue · 9 comments

tagy commented

Have this in my build.gradle and it works fine:

implementation("io.github.pdvrieze.xmlutil:core-android:0.86.3") implementation("io.github.pdvrieze.xmlutil:serialization-android:0.86.3")

But updating it to:

implementation("io.github.pdvrieze.xmlutil:core-android:0.90.0-RC3") implementation("io.github.pdvrieze.xmlutil:serialization-android:0.90.0-RC3")

Gives me: Failed to resolve: io.github.pdvrieze.xmlutil:core-base:0.90.0-RC3

More details shows:

`No matching variant of io.github.pdvrieze.xmlutil:core-base:0.90.0-RC3 was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.4.1' but:

  • Variant 'iosArm64ApiElements-published' capability io.github.pdvrieze.xmlutil:core-base:0.90.0-RC3 declares a library, preferably optimized for non-jvm:
    • Incompatible because this component declares a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during compile-time, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'
    • Other compatible attributes:
      • Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.4.1')
      • Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
  • Variant 'iosArm64MetadataElements-published' capability io.github.pdvrieze.xmlutil:core-base:0.90.0-RC3 declares a library, preferably optimized for non-jvm:
    • Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during compile-time, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'
    • Other compatible attributes:
      • Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.4.1')
      • Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')`

I've managed to reproduce it. I'll be removing the hijinks with packages. Instead the JVM/Android specific code will not be included automatically by depending on core (but will be included for serialization).

It still persists on 0.90.0

No matching variant of io.github.pdvrieze.xmlutil:core:0.90.0 was found.

  • Variant 'jvmCommonApiElements-published' declares a library for use during compile-time, preferably optimized for standard JVMs:
    • Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'

Can you share some of your configuration. It should be permissible for the jvm variant to resolve against Android (it will work).

serialization-xml-core = { module = "io.github.pdvrieze.xmlutil:core-android", version.ref = "xmlutil" }
serialization-xml = { module = "io.github.pdvrieze.xmlutil:serialization-android", version.ref = "xmlutil" }

Here is the build log: https://github.com/FooIbar/EhViewer/actions/runs/9498750818/job/26178131607

Just a curious qustion, why do you create an jvm target named android manually instead using the androidTarget which will setup all correct Gradle attributes automatically?

@hfhbd The reason is that this is not build against the Android SDK (creating an AAR), but it is actually just a regular Jar that is optimized for use in Android. I actually found the cause, there is an explicit dependency on the now no longer existing android variant of core. It should be fixed soon (0.90.1)

How soon will it release?

I am releasing it now, it should be soon.