Giter VIP home page Giter VIP logo

Comments (4)

MatkovIvan avatar MatkovIvan commented on August 16, 2024 1

but this is a Jetbrains issue to update the binary that includes the fix

We're redirecting original Google's binaries on Android, it allows avoiding conflicts with Android-only libraries and update that part in project independently.
Just add a patched Google dependency to your androidMain sourceset.

PS There is 2.8.3 with proper ProGuard rules for that compatibility reflection hack.

from compose-multiplatform.

blakelee avatar blakelee commented on August 16, 2024 1

Neat, so if I'm following correctly I can just do something like this? I'm not seeing a 2.8.3 anywhere yet, I'm not as familiar with the android.googlesource.com for finding these things. Hopefully this post will help out others that are struggling with the same issue.

kotlin {
  ...
  sourceSets {
    commonMain.dependencies {
      implementation("org.jetbrains.androidx.lifecycle:lifecycle-runtime-compose:2.8.0")
    }
    androidMain.dependencies {
     implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.2")
    }
  }
}

Does adding the Android dependencies for other things also work? I'm assuming as long as the Kotlin version and Compose compiler are the same I can just put other updated libraries in androidMain.

from compose-multiplatform.

MatkovIvan avatar MatkovIvan commented on August 16, 2024

Does adding the Android dependencies for other things also work?

It will work for JetBrains' multiplatform adoptions of compose/lifecycle/navigation. It works because we don't even re-build android and uses redirection to Google's binaries on platforms where supported. Aside of independent applying of patches, it allows using Android-only libraries with these dependencies without issues like "Duplicate class declarations".

from compose-multiplatform.

okushnikov avatar okushnikov commented on August 16, 2024

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

from compose-multiplatform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.