-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
21 additions
and
23 deletions.
There are no files selected for viewing
23 changes: 0 additions & 23 deletions
23
...ovy/com/github/jengelman/gradle/plugins/shadow/util/repo/maven/MavenFileRepository.groovy
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
.../kotlin/com/github/jengelman/gradle/plugins/shadow/util/repo/maven/MavenFileRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.github.jengelman.gradle.plugins.shadow.util.repo.maven | ||
|
||
import java.io.File | ||
import java.net.URI | ||
|
||
/** | ||
* A fixture for dealing with file Maven repositories. | ||
*/ | ||
open class MavenFileRepository(private val rootDir: File) : MavenRepository { | ||
|
||
override val uri: URI = rootDir.toURI() | ||
|
||
override fun module(groupId: String, artifactId: String): MavenFileModule { | ||
return module(groupId = groupId, artifactId = artifactId, version = "0.0.0") | ||
} | ||
|
||
override fun module(groupId: String, artifactId: String, version: String): MavenFileModule { | ||
val artifactDir = rootDir.resolve("${groupId.replace('.', '/')}/$artifactId/$version") | ||
return MavenFileModule(artifactDir, groupId, artifactId, version) | ||
} | ||
} |