Skip to content

Commit

Permalink
Convert MavenFileRepository
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Dec 17, 2024
1 parent 5d17555 commit 0755162
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.

This file was deleted.

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)
}
}

0 comments on commit 0755162

Please sign in to comment.