Giter VIP home page Giter VIP logo

Comments (6)

akexorcist avatar akexorcist commented on July 24, 2024 11

Preview an UI in commonMain on IntelliJ IDEA that is what I want.

from compose-multiplatform.

igordmn avatar igordmn commented on July 24, 2024 3

Sub-issue: project created by kmp.jetbrains.com doesn't support Preview in IDEA/Android Studio #4839

from compose-multiplatform.

malbanese avatar malbanese commented on July 24, 2024 1

For anyone else who finds this, I've found a solution that fits my needs while waiting for better preview support in Compose Multiplatform and Android Studio.

I was able to use the new Compose Preview Screenshot Testing library inside fully KMP / Compose multiplatform modules.

Previews work inside Android Studio under the proper package, and this (mostly) solves my screenshot testing needs as well. Obviously there are some requirements like putting previews in the screenshotTesting source directory, require an Android target with AGP 8.5.0, and only being able to pull from the common/android sources.

Here's the Gradle convention plugin I'm using to apply to the relevant modules:
https://gist.github.com/malbanese/6f015e0390ee767c4bc0acb87f697755

from compose-multiplatform.

ellet0 avatar ellet0 commented on July 24, 2024

I agree that we have to either use the Android one for compability or the one from Jetbrains compose multiplatform as it's more future proof.

from compose-multiplatform.

malbanese avatar malbanese commented on July 24, 2024

+1 Getting multiplatform compose previews to work in different places is currently a hassle.

from compose-multiplatform.

igordmn avatar igordmn commented on July 24, 2024

A report in Kotlin IDEA plugin tracker: https://youtrack.jetbrains.com/issue/KTIJ-30072

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.