Skip to content

Commit b48202c

Browse files
committed
cleanup after running fetch
1 parent 4155255 commit b48202c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.licenseignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ Plugins/**/0_PLEASE_SYMLINK*
4747
Plugins/PluginsShared/JavaKitConfigurationShared
4848
Samples/JavaDependencySampleApp/gradle
4949
Sources/_Subprocess/_nio_locks.swift
50+
Samples/gradle

Sources/Java2Swift/JavaToSwift+FetchDependencies.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@ extension JavaToSwift {
4747
let workDir = URL(fileURLWithPath: FileManager.default.currentDirectoryPath)
4848
.appendingPathComponent(".build")
4949
let resolverDir = try! createTemporaryDirectory(in: workDir)
50+
defer {
51+
try? FileManager.default.removeItem(at: resolverDir)
52+
}
5053

54+
// We try! because it's easier to track down errors like this than when we bubble up the errors,
55+
// and don't get great diagnostics or backtraces due to how swiftpm plugin tools are executed.
56+
5157
try! copyGradlew(to: resolverDir)
5258

5359
try! printGradleProject(directory: resolverDir, dependencies: dependencies)

0 commit comments

Comments
 (0)