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 b48202c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .licenseignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ Plugins/**/0_PLEASE_SYMLINK*
Plugins/PluginsShared/JavaKitConfigurationShared
Samples/JavaDependencySampleApp/gradle
Sources/_Subprocess/_nio_locks.swift
Samples/gradle
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 b48202c

Please sign in to comment.