-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure the "material3-window-size-class" module as CMP and include it to the publication #1466
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move WindowSizeClassTest
to commonTest
it should work almost as-is.
Also please generate API dump (reason of red CI)
skikoMain.dependsOn(commonMain) | ||
desktopMain.dependsOn(skikoMain) | ||
nonJvmMain.dependsOn(skikoMain) | ||
webMain.dependsOn(nonJvmMain) | ||
jsMain.dependsOn(webMain) | ||
wasmJsMain.dependsOn(webMain) | ||
nativeMain.dependsOn(nonJvmMain) | ||
|
||
skikoTest.dependsOn(commonTest) | ||
desktopTest.dependsOn(skikoTest) | ||
nonJvmTest.dependsOn(skikoTest) | ||
webTest.dependsOn(nonJvmTest) | ||
jsTest.dependsOn(webTest) | ||
wasmJsTest.dependsOn(webTest) | ||
nativeTest.dependsOn(nonJvmTest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skikoMain.dependsOn(commonMain) | |
desktopMain.dependsOn(skikoMain) | |
nonJvmMain.dependsOn(skikoMain) | |
webMain.dependsOn(nonJvmMain) | |
jsMain.dependsOn(webMain) | |
wasmJsMain.dependsOn(webMain) | |
nativeMain.dependsOn(nonJvmMain) | |
skikoTest.dependsOn(commonTest) | |
desktopTest.dependsOn(skikoTest) | |
nonJvmTest.dependsOn(skikoTest) | |
webTest.dependsOn(nonJvmTest) | |
jsTest.dependsOn(webTest) | |
wasmJsTest.dependsOn(webTest) | |
nativeTest.dependsOn(nonJvmTest) | |
skikoMain.dependsOn(commonMain) | |
targets.configureEach { target -> | |
if (target.platformType !in [KotlinPlatformType.androidJvm, KotlinPlatformType.common]) { | |
target.compilations["main"].defaultSourceSet { | |
dependsOn(skikoMain) | |
} | |
target.compilations["test"].defaultSourceSet { | |
dependsOn(commonTest) | |
} | |
} | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a profit of this code. it is harder to understand and spends same number of lines of code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because you need to manually add dependencies to nativeMain
to all specific architectures/OSes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't say I agree with the proposed changes.
To have a flexible and common logic for all modules we need to extract it to the plugin. At the moment I see just copy-pasted code snippets around the project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… it to the publication (#1466) Configure the `material3-window-size-class` module as CMP and include it to the publication. Added new method to non-android source set to calculate `WindowSizeClass`. Fixes https://youtrack.jetbrains.com/issue/CMP-2404 ## Testing Checked it in the MPP demo app: <img width="400" alt="image" src="https://github.com/user-attachments/assets/4c1b6fab-132d-4d1f-91fb-2c5a14bd9cab"> ## Release Notes ### Features - Multiple Platforms - Commonized `material3-window-size-class` module
Was it intentional to not add this too the |
I'm wondering the same thing in the meantime jetbrains-compose-window-size = { module = "org.jetbrains.compose.material3:material3-window-size-class", version.ref = "cmp-plugin" } |
Yes but it doesn't work so I wouldn't worry. Not sure how the tests passed TBH.. |
Yeah, same here, I can't seem to reference the function |
Pull requests are not right place to discuss features or issues. Let's do this on the youtrack For your case:
|
Configure the
material3-window-size-class
module as CMP and include it to the publication.Added new method to non-android source set to calculate
WindowSizeClass
.Fixes https://youtrack.jetbrains.com/issue/CMP-2404
Testing
Checked it in the MPP demo app:
Release Notes
Features - Multiple Platforms
material3-window-size-class
module