Skip to content

Commit

Permalink
Update docs for KMP usage
Browse files Browse the repository at this point in the history
  • Loading branch information
PatilShreyas committed Jul 28, 2024
1 parent 6e3835a commit 9f0fc7b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
File renamed without changes
Binary file added docs/images/gradle-plugin-example-kmp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 16 additions & 4 deletions docs/use/using-gradle-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Using the Gradle Plugin, you can fully automate the process of generating the re
This Gradle plugin takes care of generating raw compose metrics and report from the Compose compiler and then
generates the beautified report from them.

**This plugin has support for Android projects and Kotlin Multiplatform projects.**

## ✅ Apply the plugin

Apply the plugin to the module in which _**compose is enabled**_.
Expand Down Expand Up @@ -79,12 +81,22 @@ Add this to top project level `build.gradle`

## 💫 Sync the project

Once plugin is applied, sync the project. After the project is synced, tasks for generating compose report will be
generated for the variants and flavors used in the project.
Once plugin is applied, sync the project. After the project is synced, tasks for generating compose
report will be generated for the variants and flavors used in the project.

!!! example

=== "Android Project"

![](../images/gradle-plugin-example-android.png){ height="150" }

=== "Multiplatform Project"
For Kotlin Multiplatform project, tasks will be generated for the platform modules
and build types.

![](../images/gradle-plugin-example-kmp.png){ height="120" }


![](../images/gradle-plugin-example.png){ height="150" }

## 🪄 Generate report

Expand Down Expand Up @@ -139,7 +151,7 @@ If you have to configure plugin parameters manually (which is completely optiona
}
```

=== "Kotlin"
=== "Kotlin (JVM / Android / Multiplatform)"

```kotlin title="build.gradle.kts"
htmlComposeCompilerReport {
Expand Down

0 comments on commit 9f0fc7b

Please sign in to comment.