a914-gowtham / compose-ratingbar

A ratingbar composable for jetpack compose :rocket::star2:
MIT License
223 stars 20 forks source link

Multiplatform support? #41

Open mbichlmeier opened 8 months ago

mbichlmeier commented 8 months ago

Hi. Is there any kotlin/compose multiplatform support planned?

a914-gowtham commented 8 months ago

hi @mbichlmeier , there is a PR created by @VictorKabata will check merge it

mbichlmeier commented 8 months ago

Awesome, thank you guys!

mbichlmeier commented 8 months ago

hi @a914-gowtham . I'm getting errors with your v1.3.9 . I'm quite sure I'm doing something wrong but I thought I only had to add the dependency to my common package?

sourceSets {
     val commonMain by getting {
            dependencies {
                 implementation("com.github.a914-gowtham:compose-ratingbar:1.3.9")
            }
    }
    ....
}

This fails with the following message:

Could not resolve all dependencies for configuration ':shared:iosSimulatorArm64CompileKlibraries'.
> Could not resolve com.github.a914-gowtham:compose-ratingbar:1.3.9.
  Required by:
      project :shared
   > No matching variant of com.github.a914-gowtham:compose-ratingbar:1.3.9 was found. The consumer was configured to find a usage of 'kotlin-api' of a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native', attribute 'org.jetbrains.kotlin.native.target' with value 'ios_simulator_arm64' but:
       - Variant 'releaseApiElements-published' capability com.github.a914-gowtham:compose-ratingbar:1.3.9 declares an API of a library:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_simulator_arm64')
       - Variant 'releaseRuntimeElements-published' capability com.github.a914-gowtham:compose-ratingbar:1.3.9 declares a runtime of a library:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_simulator_arm64')
       - Variant 'releaseSourcesElements-published' capability com.github.a914-gowtham:compose-ratingbar:1.3.9 declares a runtime of a component:
           - Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_simulator_arm64')

Is there something I'm doing wrong? Seems like there is no iOS support?

a914-gowtham commented 8 months ago

That is a sdk issue. Merged the PR but, the ratingbar module is being published instead of ratingbar-multiplatforn module

a914-gowtham commented 7 months ago

@mbichlmeier have created a separate repo for mutliplatform https://github.com/a914-gowtham/compose-mutliplatform-ratingbar

having issue while publishing in jitpack. will check or move to maven central

mbichlmeier commented 7 months ago

Thanks @a914-gowtham . I really appreciate your effort :)

hm-tamim commented 6 months ago

Any update on this?