People building your iOS app in a CI using fastlan...
# ios
r
People building your iOS app in a CI using fastlane with an XCode project calling Gradle at some point to build your Kotlin code, did you manage to get the Gradle logs to show on your CI logs? I only get "Running script" for like 10 minutes
When building the app in XCode I can see the Gradle logs in the build logs, live.
It looks like with fastlane, the only way to get the logs at some point is to disable xcpretty/xcbeautify by passing parameter
xcodebuild_formatter: ""
to
gym
. That only prints the entire Gradle logs AFTER the Gradle build has completed, so it still prints nothing for minutes…
(Also the raw logs look horrible, obviously)
c
I have the same problem and I'm interested in a solution as well.
t
One approach that might work is writing from Gradle directly to
tty
. This will allow
fastlane
to pipe `xcodebuild`'s stdout to
xcpretty
, but Gradle's output will be written directly to the underlying terminal. To set this up you could modify your script phase integration with something like:
Copy code
./gradlew :shared:embedAndSignAppleFrameworkForXcode --console=plain --debug > ${MY_TTY:-/dev/stdout}
and run
fastlane
with:
Copy code
MY_TTY=$(tty) fastlane gym