Skip to content

Commit

Permalink
Fix Gradle 8.7 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenraven committed Apr 5, 2024
1 parent 386e5bd commit fba35ed
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 91 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.gradle.api.UnknownTaskException;
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.artifacts.Dependency;
import org.gradle.api.artifacts.DependencySet;
import org.gradle.api.artifacts.ModuleDependency;
import org.gradle.api.artifacts.ResolvedArtifact;
import org.gradle.api.artifacts.ResolvedDependency;
Expand Down Expand Up @@ -70,7 +69,6 @@
import com.gtnewhorizons.retrofuturagradle.minecraft.MinecraftTasks;
import com.gtnewhorizons.retrofuturagradle.minecraft.RunMinecraftTask;
import com.gtnewhorizons.retrofuturagradle.util.Distribution;
import com.gtnewhorizons.retrofuturagradle.util.FileWithSourcesDependency;
import com.gtnewhorizons.retrofuturagradle.util.IJarOutputTask;
import com.gtnewhorizons.retrofuturagradle.util.IJarTransformTask;
import com.gtnewhorizons.retrofuturagradle.util.JarChain;
Expand Down Expand Up @@ -505,38 +503,17 @@ public MCPTasks(Project project, MinecraftExtension mcExt, MinecraftTasks mcTask
.configure(task -> task.from(injectedSourceSet.getOutput().getAsFileTree()));

// A dummy source set to satisfy IntelliJ native launch configurations
final Configuration cfgBuiltMc = project.getConfigurations().create("builtMinecraft");
{
cfgBuiltMc.setCanBeResolved(false);
cfgBuiltMc.setCanBeConsumed(false);
cfgBuiltMc.setVisible(false);
DependencySet builtMcDeps = cfgBuiltMc.getDependencies();

builtMcDeps.addLater(
mcExt.getForgeVersion().map(
forgeVer -> new FileWithSourcesDependency(
layout.files(taskPackagePatchedMc),
"rfg",
"forgeBin",
forgeVer)));
builtMcDeps.addLater(
mcExt.getMcVersion().map(
mcVer -> new FileWithSourcesDependency(
layout.files(taskPackageMcLauncher),
"rfg",
"gradleStart",
mcVer)));
}
final SourceSet ideMainSet = sourceSets.create("ideVirtualMain", sourceSet -> {
project.getConfigurations().named(sourceSet.getImplementationConfigurationName()).configure(ideConfig -> {
ideConfig.extendsFrom(cfgBuiltMc);
ideConfig.extendsFrom(patchedConfiguration);
ideConfig.extendsFrom(mcTasks.getLwjgl2Configuration());
ideConfig.extendsFrom(
project.getConfigurations().getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME));
});

final ConfigurableFileCollection classpath = objects.fileCollection();
classpath.from(patchedMcSources.getOutput());
classpath.from(launcherSources.getOutput());
classpath.from(mainSet.getOutput());
classpath.from(apiSet.getOutput());

Expand Down

This file was deleted.

0 comments on commit fba35ed

Please sign in to comment.