mirror of
https://github.com/sbt/sbt.git
synced 2026-09-01 02:27:13 +02:00
expose launcher repositories
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package xsbti;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
public interface IvyRepository extends Repository
|
||||
{
|
||||
String id();
|
||||
URL url();
|
||||
String ivyPattern();
|
||||
String artifactPattern();
|
||||
}
|
||||
@@ -10,6 +10,7 @@ public interface Launcher
|
||||
public ClassLoader topLoader();
|
||||
public GlobalLock globalLock();
|
||||
public File bootDirectory();
|
||||
public xsbti.Repository[] ivyRepositories();
|
||||
// null if none set
|
||||
public File ivyHome();
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package xsbti;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
public interface MavenRepository extends Repository
|
||||
{
|
||||
String id();
|
||||
URL url();
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package xsbti;
|
||||
|
||||
public enum Predefined
|
||||
{
|
||||
Local("local"),
|
||||
MavenLocal("maven-local"),
|
||||
MavenCentral("maven-central"),
|
||||
ScalaToolsReleases("scala-tools-releases"),
|
||||
ScalaToolsSnapshots("scala-tools-snapshots");
|
||||
|
||||
private final String label;
|
||||
private Predefined(String label) { this.label = label; }
|
||||
public String toString() { return label; }
|
||||
|
||||
public static Predefined toValue(String s)
|
||||
{
|
||||
for(Predefined p : values())
|
||||
if(s.equals(p.toString()))
|
||||
return p;
|
||||
|
||||
StringBuilder msg = new StringBuilder("Expected one of ");
|
||||
for(Predefined p : values())
|
||||
msg.append(p.toString()).append(", ");
|
||||
msg.append("got '").append(s).append("'.");
|
||||
throw new RuntimeException(msg.toString());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package xsbti;
|
||||
|
||||
public interface PredefinedRepository extends Repository
|
||||
{
|
||||
Predefined id();
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package xsbti;
|
||||
|
||||
public interface Repository {}
|
||||
Reference in New Issue
Block a user