Skip to content

Commit 449c1d8

Browse files
committed
Update README.md: add detail for usage as library
1 parent e0c9e39 commit 449c1d8

File tree

1 file changed

+34
-18
lines changed

1 file changed

+34
-18
lines changed

README.md

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Compose Compiler Reports to HTML Generator
22

3-
A CLI utility to convert Jetpack Compose compiler metrics and reports to beautified 😍 HTML page.
3+
A CLI utility to convert Jetpack Compose compiler metrics and reports to beautified 😍 HTML page.
44
_Made with ❤️ for Android Developers and Composers_
55

66
[![Build](https://github.com/PatilShreyas/compose-report-to-html/actions/workflows/build.yml/badge.svg)](https://github.com/PatilShreyas/compose-report-to-html/actions/workflows/build.yml)
@@ -12,23 +12,26 @@ _Made with ❤️ for Android Developers and Composers_
1212
[![GitHub watchers](https://img.shields.io/github/watchers/PatilShreyas/compose-report-to-html?style=social)](https://github.com/PatilShreyas/compose-report-to-html/watchers)
1313
[![Twitter Follow](https://img.shields.io/twitter/follow/imShreyasPatil?label=Follow&style=social)](https://twitter.com/imShreyasPatil)
1414

15+
| | **Install** | **Downloads** |
16+
|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
17+
| **NPM** | [![NPM Package](https://img.shields.io/npm/v/compose-report2html?label=npm&logo=npm)](https://www.npmjs.com/package/compose-report2html) | [![NPM Downloads](https://img.shields.io/npm/dm/compose-report2html?label=Downloads&logo=npm)](https://www.npmjs.com/package/compose-report2html) |
18+
| **JAR** | [![Download JAR](https://img.shields.io/github/v/release/patilshreyas/compose-report-to-html?label=JAR&logo=java)](https://github.com/patilshreyas/compose-report-to-html/releases/latest/download/composeReport2Html.jar) | [![GitHub downloads](https://img.shields.io/github/downloads/PatilShreyas/compose-report-to-html/total?label=Downloads&logo=java)](https://github.com/patilshreyas/compose-report-to-html/releases/latest/download/composeReport2Html.jar) |
19+
| **Maven** | [![Install](https://img.shields.io/maven-central/v/dev.shreyaspatil.compose-compiler-report-generator/core?label=Maven%20Central&logo=android&style=flat-square)](https://search.maven.org/search?q=g:dev.shreyaspatil.compose-compiler-report-generator) |
1520

16-
| | **Install** | **Downloads** |
17-
|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
18-
| **NPM** | [![NPM Package](https://img.shields.io/npm/v/compose-report2html?label=npm&logo=npm)](https://www.npmjs.com/package/compose-report2html) | [![NPM Downloads](https://img.shields.io/npm/dm/compose-report2html?label=Downloads&logo=npm)](https://www.npmjs.com/package/compose-report2html) |
19-
| **JAR** | [![Download JAR](https://img.shields.io/github/v/release/patilshreyas/compose-report-to-html?label=JAR&logo=java)](https://github.com/patilshreyas/compose-report-to-html/releases/latest/download/composeReport2Html.jar) | [![GitHub downloads](https://img.shields.io/github/downloads/PatilShreyas/compose-report-to-html/total?label=Downloads&logo=java)](https://github.com/patilshreyas/compose-report-to-html/releases/latest/download/composeReport2Html.jar) |
21+
## 💡 Motivation
2022

21-
22-
## 💡 Motivation
23-
24-
The Compose Compiler plugin can generate reports / metrics around certain compose-specific concepts that can be useful to understand what is happening with some of your compose code at a fine-grained level.
25-
[_**See this**_](https://github.com/androidx/androidx/blob/androidx-main/compose/compiler/design/compiler-metrics.md).
23+
The Compose Compiler plugin can generate reports / metrics around certain compose-specific concepts that can be useful
24+
to understand what is happening with some of your compose code at a fine-grained level.
25+
[_**See this**_](https://github.com/androidx/androidx/blob/androidx-main/compose/compiler/design/compiler-metrics.md).
2626

2727
This generates reports in `json`, `csv` and `txt` files which are not easily trace-able for developers.
2828
Also, Composable function and class reports becomes large and tedious to check.
29-
This tool parses the reports and metrics generated by Compose compiler and beautifies into a HTML page and intelligently distinguishes problematic and non-problematic composable functions and classes.
29+
This tool parses the reports and metrics generated by Compose compiler and beautifies into a HTML page and intelligently
30+
distinguishes problematic and non-problematic composable functions and classes.
3031

31-
_This utility doesn't generate Compose Metrics and Reports. First, raw Compose report should be generated from the Compiler and those generated files should be feed to this utility. By parsing that data, this utility generates the beautified report._
32+
_This utility doesn't generate Compose Metrics and Reports. First, raw Compose report should be generated from the
33+
Compiler and those generated files should be feed to this utility. By parsing that data, this utility generates the
34+
beautified report._
3235

3336
## 🧑‍💻 Usage
3437

@@ -40,7 +43,8 @@ To install the CLI utility, there are two ways
4043

4144
#### 1.1 Directly use `.jar` distribution
4245

43-
Navigate to the [releases](https://github.com/PatilShreyas/compose-report-to-html/releases) and download the latest JAR artifact.
46+
Navigate to the [releases](https://github.com/PatilShreyas/compose-report-to-html/releases) and download the latest JAR
47+
artifact.
4448

4549
#### 1.2 Install from NPM
4650

@@ -84,7 +88,10 @@ Options:
8488
8589
### 3. Generate report
8690
87-
Make sure to generate Compose compiler metrics and reports as mentioned [here](https://github.com/androidx/androidx/blob/androidx-main/compose/compiler/design/compiler-metrics.md) or [this good read article by Chris Banes](https://chris.banes.dev/composable-metrics/). These files are then needed to this CLI utility to feed the data.
91+
Make sure to generate Compose compiler metrics and reports as
92+
mentioned [here](https://github.com/androidx/androidx/blob/androidx-main/compose/compiler/design/compiler-metrics.md)
93+
or [this good read article by Chris Banes](https://chris.banes.dev/composable-metrics/). These files are then needed to
94+
this CLI utility to feed the data.
8895
8996
To generate the report, provide details related to app, metric and report files and output directory.
9097
@@ -112,9 +119,17 @@ java -jar composeReport2Html.jar \
112119
-o notyReport
113120
```
114121
115-
In the above example, it will create report with name **"NotyKT"** with specified metric and report files and finally report will be generated in the specified path i.e. `notyReport/index.html`.
122+
In the above example, it will create report with name **"NotyKT"** with specified metric and report files and finally
123+
report will be generated in the specified path i.e. `notyReport/index.html`.
124+
125+
## Utility as a library
126+
127+
This utility is also published as a maven artifact on Maven Central so that you can make use of it as you want to use it
128+
(_For example: automation in CI_).
129+
130+
Refer to the Wiki for more information: [**Using this utility as a library**](https://github.com/PatilShreyas/compose-report-to-html/wiki/Using-utility-as-a-library)
116131
117-
## 📈 Report Overview
132+
## 📈 Report Overview
118133
119134
Once report is generated, it looks like this.
120135
@@ -126,7 +141,7 @@ Once report is generated, it looks like this.
126141
| **Class Report** | Parses `-classes.txt` file and separates out stable and unstable classes out of it and properly highlights issues associated with them. <br><br> ![Class Report](images/class-report.png) |
127142
128143
Right now, work is in progress and more improvements related to the report
129-
will happen in some time. If you have any feedback / suggestions related to
144+
will happen in some time. If you have any feedback / suggestions related to
130145
the report, feel free to discuss it (_find discussion link in the below section_).
131146
132147
## 🙋‍♂️ Contribute
@@ -135,7 +150,8 @@ Read [contribution guidelines](CONTRIBUTING.md) for more information regarding c
135150
136151
## 💬 Discuss?
137152
138-
Have any questions, doubts or want to present your opinions, views? You're always welcome. You can [start discussions](https://github.com/PatilShreyas/compose-report-to-html/discussions).
153+
Have any questions, doubts or want to present your opinions, views? You're always welcome. You
154+
can [start discussions](https://github.com/PatilShreyas/compose-report-to-html/discussions).
139155
140156
## License
141157

0 commit comments

Comments
 (0)