Skip to content

Commit

Permalink
Replace File with Path in MavenPathRepository
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Dec 3, 2024
1 parent 713566c commit 020a476
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ abstract class PluginSpecification extends Specification {
}

AppendableMavenPathRepository repo(String path = 'maven-repo') {
new AppendableMavenPathRepository(dir.resolve(path).toFile())
new AppendableMavenPathRepository(dir.resolve(path))
}

void assertJarFileContentsEqual(File f, String path, String contents) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
package com.github.jengelman.gradle.plugins.shadow.util.repo.maven

import java.nio.file.Path


/**
* A fixture for dealing with file Maven repositories.
*/
class MavenPathRepository implements MavenRepository {
final File rootDir
final Path rootDir

MavenPathRepository(File rootDir) {
MavenPathRepository(Path rootDir) {
this.rootDir = rootDir
}

@Override
URI getUri() {
return rootDir.toURI()
return rootDir.toFile().toURI()
}

@Override
Expand Down

0 comments on commit 020a476

Please sign in to comment.