Skip to content

Commit

Permalink
cleanup after running fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
ktoso committed Dec 13, 2024
1 parent 4155255 commit 061b67b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/Java2Swift/JavaToSwift+FetchDependencies.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ extension JavaToSwift {
let workDir = URL(fileURLWithPath: FileManager.default.currentDirectoryPath)
.appendingPathComponent(".build")
let resolverDir = try! createTemporaryDirectory(in: workDir)
defer {
try? FileManager.default.removeItem(at: resolverDir)
}

// We try! because it's easier to track down errors like this than when we bubble up the errors,
// and don't get great diagnostics or backtraces due to how swiftpm plugin tools are executed.

try! copyGradlew(to: resolverDir)

try! printGradleProject(directory: resolverDir, dependencies: dependencies)
Expand Down

0 comments on commit 061b67b

Please sign in to comment.