Skip to content

Commit

Permalink
Convert MavenFileRepository
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Dec 10, 2024
1 parent 10f6fa3 commit c15be97
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.
*/
abstract class MavenFileRepository(private val rootDir: File) : MavenRepository {

override val uri: URI = rootDir.toURI()

override fun module(groupId: String, artifactId: String): MavenModule {
return module(groupId, artifactId, "1.0")
}

override fun module(groupId: String, artifactId: String, version: String): MavenModule {
val artifactDir = rootDir.resolve("${groupId.replace('.', '/')}/$artifactId/$version")
return MavenFileModule(artifactDir, groupId, artifactId, version)
}
}

0 comments on commit c15be97

Please sign in to comment.