So I have been testing a CI build for iOS w/ KMP, ...
# multiplatform
j
So I have been testing a CI build for iOS w/ KMP, while it works in general, if there is a build error on the Kotlin side, the error is not reported to the Xcode Run Script properly so the Xcode build continues and reports success. If building from Xcode IDE, the error is reported properly, just not from xcodebuild which we use for CI builds. Anybody run into this before? I'm currently looking at how to capture the error from gradlew so I can return an error up to Xcode
In case anyone else has this same issue, I'm posting my fix here. In the run script, you must check the last exit code after the gradlew script runs for error.
./gradlew -i :shared:embedAndSignAppleFrameworkForXcode -PXCODE_CONFIGURATION=${CONFIGURATION}
*if* [ $? -eq 0 ]; *then*
*exit* 0
else
*echo* "error: There was an error building KMP iOS framework"
*exit* 1
fi