cdsap / InfoKotlinProcess

Include Kotlin process information in Build Scans or build output
MIT License
36 stars 2 forks source link

BuildScanExtension is not accessible #13

Open xiahl33 opened 1 year ago

xiahl33 commented 1 year ago

Since BuildScanExtension is not accessible, it only output info at the end of build even if we using grade enterprise.

cdsap commented 1 year ago

Hi @xiahl33, thanks for the report. Which Gradle and Gradle Enterprise plugin versions are you using?

xiahl33 commented 1 year ago

Hi @xiahl33, thanks for the report. Which Gradle and Gradle Enterprise plugin versions are you using?

Hi @cdsap , Thanks for reply! We use Gradle 7.6 and Gradle Enterprise plugin 3.7.1

cdsap commented 1 year ago

@xiahl33 tested with Gradle 7.6, GE plugin 3.7.1 and latest version 0.1.3: output is reported: https://ge.solutions-team.gradle.com/s/6a23noe6ygys2/custom-values

can you test with latest version please(0.1.3)?

xiahl33 commented 1 year ago

@cdsap Hi, Thanks for quick reply! I tested with latest version (0.1.3), and it still only output at the end of build. Now we downgraded the GE plugin. And Use Gradle 7.6.1, Gradle Enterprise plugin 3.10, Android Gradle plugin 7.4.1

I think the problem is project.extensions.findByType(com.gradle.scan.plugin.BuildScanExtension::class.java) doesn't work in our product. I tried it in our plugin and it return null. We are currently using ScanApi(project)to get buildscan. Is it possible you can add a check if project.extensions.findByType(com.gradle.scan.plugin.BuildScanExtension::class.java) return null try ScanApi(project)?