Skip to content

Commit

Permalink
Fix SplitSourceSet visibility and sources for vanilla libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebemish committed Jan 4, 2025
1 parent e59febe commit 6e427d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.gradle.api.GradleException;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.artifacts.ArtifactRepositoryContainer;
import org.gradle.api.artifacts.dsl.ComponentMetadataHandler;
import org.gradle.api.artifacts.dsl.RepositoryHandler;
import org.gradle.api.artifacts.repositories.IvyArtifactRepository;
Expand Down Expand Up @@ -69,6 +70,7 @@ private void repositories(RepositoryHandler repositoryHandler) {
repo.setUrl(URI.create("https://libraries.minecraft.net/"));
repo.metadataSources(MavenArtifactRepository.MetadataSources::mavenPom);
repo.content(MinecraftLibrariesMavenContent::applyContent);
repo.artifactUrls(ArtifactRepositoryContainer.MAVEN_CENTRAL_URL);
});
repositoryHandler.remove(minecraftLibraries);
repositoryHandler.addFirst(minecraftLibraries);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,28 @@ public String getName() {
return name;
}

MinecraftInstallation getJoined() {
public MinecraftInstallation getJoined() {
if (joined == null) {
throw new IllegalStateException("Joined source set not present in "+getName());
}
return joined;
}

MinecraftInstallation getCommon() {
public MinecraftInstallation getCommon() {
if (common == null) {
throw new IllegalStateException("Common source set not present in "+getName());
}
return common;
}

MinecraftInstallation getClient() {
public MinecraftInstallation getClient() {
if (client == null) {
throw new IllegalStateException("Client source set not present in "+getName());
}
return client;
}

MinecraftInstallation getServer() {
public MinecraftInstallation getServer() {
if (server == null) {
throw new IllegalStateException("Server source set not present in "+getName());
}
Expand Down

0 comments on commit 6e427d7

Please sign in to comment.