PatilShreyas / compose-report-to-html

A utility (Gradle Plugin + CLI) to convert Jetpack Compose compiler metrics and reports to beautified HTML page.
https://patilshreyas.github.io/compose-report-to-html/
MIT License
383 stars 9 forks source link

Cannot include build 'build-logic' in build 'module_name_here'. This is not supported yet. #27

Closed jakoss closed 1 year ago

jakoss commented 1 year ago

I'm trying to run the gradle plugin on some of my modules. Since we are using gradle conventions (which are in the gradle project named build-logic) i applied plugin globally in root build.gradle like this:

alias libs.plugins.composeCompilerReportGenerator apply false

And then i apply the plugin only in selected modules via convention file, like this:

plugins {
    id 'dev.shreyaspatil.compose-compiler-report-generator'
}

When i do that i get the error:

Cannot include build 'build-logic' in build 'module_name_here'. This is not supported yet.

When i apply plugin directly on a module i want to generate reports on i have the same exact issue. For some reason this plugin does not like composite builds

PatilShreyas commented 1 year ago

@jakoss I tried it on my end and this issue is not occurring. Can you please check again? Or if possible, can you provide a sample project to reproduce this?

jakoss commented 1 year ago

Sure thing, here's the branch. Try and run ./gradlew :core:ui:releaseComposeCompilerHtmlReport on there.

I had to turn off configuration cache because it still doesn't work with the plugin (you can enable it by uncommenting last 2 entries in gradle.properties)

PatilShreyas commented 1 year ago

I haven't yet cloned your repo, but I can see you're using Gradle Wrapper of 8.0, and this plugin is built with 7.6. My assumption is maybe you're using some new features in your project. I'll dig more into this. Thanks for raising this!

PatilShreyas commented 1 year ago

Just came across these open issues:

In this plugin, we are using GradleBuild task which is not working with composite builds. Have to find workaround for this.

PatilShreyas commented 1 year ago

Can see that the GradleConnector tooling API can fix this. If it works fine, will replace this whole implementation from root. Ref: https://github.com/researchgate/gradle-release/issues/304#issuecomment-1083692649

PatilShreyas commented 1 year ago

Thanks, @jakoss for raising this. This has been fixed and released in v1.0.0