Skip to content

Commit

Permalink
Removes Unnecessary Repo Handlers That Actually Break Things (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
calmilamsy authored Jul 12, 2024
1 parent 43bc886 commit a7ef915
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 25 deletions.
6 changes: 3 additions & 3 deletions src/main/java/babric/BabricRepositoryHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ private void declareRepositories(RepositoryHandler repositories) {
repo.setName("Babric");
repo.setUrl(Constants.BABRIC_MAVEN);
});
repositories.maven(repo -> { // No filter, all parts of this repo are used in a project.
repositories.maven(repo -> {
repo.setName("Modrinth");
repo.setUrl(Constants.MODRINTH_MAVEN);
repo.setUrl(Constants.GLASS_MAVEN);
repo.content(content -> {
content.includeModule("maven.modrinth", "gambac"); // Allow only gambac, don't let folk rely on this adding MR for them.
content.includeModule("net.danygames2014", "gambac"); // Allow only gambac, don't let folk rely on this adding MR for them.
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/babric/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
public class Constants {
public static final String LEGACYFABRIC_MAVEN = "https://repo.legacyfabric.net/repository/legacyfabric/";
public static final String BABRIC_MAVEN = "https://maven.glass-launcher.net/babric/";
public static final String MODRINTH_MAVEN = "https://api.modrinth.com/maven/";
public static final String GLASS_MAVEN = "https://maven.glass-launcher.net/releases/";
}
12 changes: 1 addition & 11 deletions src/main/java/babric/processor/GambacLibraryProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,9 @@ public Predicate<Library> apply(Consumer<Library> dependencyConsumer) {
if (!applied) {
applied = true;

dependencyConsumer.accept(Library.fromMaven("maven.modrinth:gambac:" + VERSION, Library.Target.LOCAL_MOD));
dependencyConsumer.accept(Library.fromMaven("net.danygames2014:gambac:" + VERSION, Library.Target.LOCAL_MOD));
}

return ALLOW_ALL;
}

@Override
public void applyRepositories(RepositoryHandler repositories) {
repositories.exclusiveContent(repository -> {
repository.forRepositories(repositories.findByName("Modrinth"));
repository.filter(filter -> {
filter.includeModule("maven.modrinth", "gambac"); // Allow only gambac, don't let folk rely on this adding MR for them.
});
});
}
}
10 changes: 0 additions & 10 deletions src/main/java/babric/processor/LWJGL2LibraryProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,6 @@ public Predicate<Library> apply(Consumer<Library> dependencyConsumer) {
};
}

@Override
public void applyRepositories(RepositoryHandler repositories) {
repositories.exclusiveContent(repository -> {
repository.forRepositories(repositories.findByName("Legacy Fabric"));
repository.filter(filter -> {
filter.includeGroup("org.lwjgl.lwjgl");
});
});
}

public static String getNativeClassifier() {
switch (Platform.CURRENT.getOperatingSystem()) {
case MAC_OS -> {
Expand Down

0 comments on commit a7ef915

Please sign in to comment.