nokeedev / gradle-native

The home of anything about Gradle support for natively compiled languages
https://nokee.dev
Apache License 2.0
47 stars 8 forks source link

Scanning Xcodebuild within build adapter #662

Open lacasseio opened 2 years ago

lacasseio commented 2 years ago

Gradle's build scan is extremely useful for quickly comparing builds and gathering useful data. At the moment, the build adapter can already capture lots of data from an Xcode build. To put it differently, we can expose all of the same information XCMetrics captures to Gradle Enterprise within a build scan. The captured information overlap with https://github.com/nokeedev/gradle-native/issues/648 with regards to showing the user status updates.

Gradle Enterprise uses build operations to capture all of its own data. Build operation is an internal concept to Gradle build tools. They are also used to update the status section of the rich console. With Gradle Enterprise supporting multiple build systems (Gradle/Maven), it should be possible to send Xcode-related build operations. However, it would require changes to GE to properly display them.

We could build a spike that uses Gradle build operations (say the one that captures task execution) to capture Xcode-specific operations to have an idea of what it could look like before adding full support to GE. We could also use custom build data, but that would be a pretty considerable hack.

lacasseio commented 2 years ago

We could also capture test execution and output into a build scan. This would require some sort of Xcode output parsing, see https://github.com/nokeedev/gradle-native/issues/648.