Skip to content

Conversation

@zamulla
Copy link
Collaborator

@zamulla zamulla commented Oct 14, 2025

No description provided.

@zamulla zamulla requested a review from a team as a code owner October 14, 2025 09:49
<toc-element toc-title="Basic project structure" topic="multiplatform-discover-project.md"/>
<toc-element toc-title="Advanced project structure" topic="multiplatform-advanced-project-structure.md"/>
<toc-element toc-title="Project configuration options" topic="multiplatform-project-configuration.md"/>
<toc-element toc-title="Project configuration options" topic="multiplatform-project-agp-9-migration.md"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong toc-title

You can remove old run configurations associated with the `composeApp` module.
2. In the `gradle/libs.versions.toml` file, update the AGP version to a 9.* version, for example:
```txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"CDE016: Unknown language is specified for a code block"
Let's try toml or text

// ...
}
```
4. In the `kotlin {}` block, specify the targets that the common module should support in this example:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous step is for the root build.gradle.kts file, specify the file with the kotlin {} block

Comment on lines +14 to +15
> To do that, in the `gradle.properties` file of your project add this property:
> `android.enableLegacyVariantApi=true`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> To do that, in the `gradle.properties` file of your project add this property:
> `android.enableLegacyVariantApi=true`.
> To do this, add the following property to the `gradle.properties` file:
> `android.enableLegacyVariantApi=true`.

Comment on lines +60 to +61
Before actually creating a module, you need to decide on what is business logic, which code is both UI- and
platform-independent.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Before actually creating a module, you need to decide on what is business logic, which code is both UI- and
platform-independent.
Before creating a module, you need to identify the code for business logic that is both UI- and platform-independent.

### Update the iOS integration
Since the iOS app entry point is not built as a separate Gradle module, you can embed the source code into any module.
In this example, `sharedUi` makes most sense:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In this example, `sharedUi` makes most sense:
In this example, `sharedUi` makes the most sense:

### Remove `composeApp` and update the Android Gradle plugin version
When all code is working from correct new modules:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When all code is working from correct new modules:
Once all code works correctly from the new modules:

1. Remove the old module completely:
1. Remove the `composeApp` dependency from the `settings.gradle.kts` file (the line `include(":composeApp")`).
2. Remove the `composeApp` directory entirely.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Remove the `composeApp` directory entirely.
2. Delete the `composeApp` directory entirely.

4. That your apps build and run with the new AGP.
Congratulations, you modernized and optimized the structure of your project!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Suggested change
Congratulations, you modernized and optimized the structure of your project!
Congratulations! You have modernized and optimized the structure of your project.

kotlin {
// ...
androidLibrary {
namespace = "com.jetbrains.greeting.demo.sharedLogic"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be sharedUi?

@ElviraMustafina
Copy link
Collaborator

The guide is long and intimidating, with repetitive steps for each platform. What do you think about adding a section with general steps for creating a module? This would help identify common patterns upfront and allow us to make repetitive steps collapsible.

@zamulla zamulla requested a review from evilya October 20, 2025 11:49
<toc-element toc-title="Basic project structure" topic="multiplatform-discover-project.md"/>
<toc-element toc-title="Advanced project structure" topic="multiplatform-advanced-project-structure.md"/>
<toc-element toc-title="Project configuration options" topic="multiplatform-project-configuration.md"/>
<toc-element toc-title="Project configuration options" topic="multiplatform-project-agp-9-migration.md"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I'm not sure if this guide will be discoverable under "Explore project structure"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants