@@ -75,11 +75,13 @@ struct FrameworkBuilder {
75
75
/// - cacheKey: The key used for caching this framework build. If nil, the framework name will
76
76
/// be used.
77
77
/// - cacheEnabled: Flag for enabling the cache. Defaults to false.
78
+ /// - Parameter logsOutputDir: The path to the directory to place build logs.
78
79
/// - Returns: A URL to the framework that was built (or pulled from the cache).
79
80
public func buildFramework( withName podName: String ,
80
81
version: String ,
81
82
cacheKey: String ? ,
82
- cacheEnabled: Bool = false ) -> URL {
83
+ cacheEnabled: Bool = false ,
84
+ logsOutputDir: URL ? = nil ) -> URL {
83
85
print ( " Building \( podName) " )
84
86
85
87
// Cache is temporarily disabled due to pod cache list issues.
@@ -332,11 +334,13 @@ struct FrameworkBuilder {
332
334
/// This will compile all architectures and use the lipo command to create a "fat" archive.
333
335
///
334
336
/// - Parameter framework: The name of the framework to be built.
337
+ /// - Parameter logsOutputDir: The path to the directory to place build logs.
335
338
/// - Returns: A path to the newly compiled framework (with any included Resources embedded).
336
- private func compileFrameworkAndResources( withName framework: String ) -> URL {
339
+ private func compileFrameworkAndResources( withName framework: String ,
340
+ logsOutputDir: URL ? = nil ) -> URL {
337
341
let fileManager = FileManager . default
338
- let outputDir = fileManager. temporaryDirectory ( withName: " frameworkBeingBuilt " )
339
- let logsDir = fileManager. temporaryDirectory ( withName: " buildLogs " )
342
+ let outputDir = fileManager. temporaryDirectory ( withName: " frameworks_being_built " )
343
+ let logsDir = logsOutputDir ?? fileManager. temporaryDirectory ( withName: " build_logs " )
340
344
do {
341
345
// Remove the compiled frameworks directory, this isn't the cache we're using.
342
346
if fileManager. directoryExists ( at: outputDir) {
0 commit comments