mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 21:47:42 -05:00
Merge remote-tracking branch 'FabricMC/dev/0.6' into dev/0.6-forge
This commit is contained in:
@@ -45,11 +45,13 @@ import org.gradle.jvm.JvmLibrary;
|
||||
import org.gradle.language.base.artifact.SourcesArtifact;
|
||||
|
||||
import net.fabricmc.loom.LoomGradleExtension;
|
||||
import net.fabricmc.loom.LoomGradlePlugin;
|
||||
import net.fabricmc.loom.configuration.RemappedConfigurationEntry;
|
||||
import net.fabricmc.loom.configuration.mods.ModProcessor;
|
||||
import net.fabricmc.loom.configuration.processors.dependency.ModDependencyInfo;
|
||||
import net.fabricmc.loom.configuration.processors.dependency.RemapData;
|
||||
import net.fabricmc.loom.util.Constants;
|
||||
import net.fabricmc.loom.util.OperatingSystem;
|
||||
import net.fabricmc.loom.util.SourceRemapper;
|
||||
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
@@ -57,7 +59,7 @@ public class ModCompileRemapper {
|
||||
public static void remapDependencies(Project project, String mappingsSuffix, LoomGradleExtension extension, SourceRemapper sourceRemapper) {
|
||||
Logger logger = project.getLogger();
|
||||
DependencyHandler dependencies = project.getDependencies();
|
||||
boolean refreshDeps = project.getGradle().getStartParameter().isRefreshDependencies();
|
||||
boolean refreshDeps = LoomGradlePlugin.refreshDeps;
|
||||
|
||||
final File modStore = extension.getRemappedModCache();
|
||||
final RemapData remapData = new RemapData(mappingsSuffix, modStore);
|
||||
@@ -95,7 +97,7 @@ public class ModCompileRemapper {
|
||||
|
||||
File remappedSources = info.getRemappedOutput("sources");
|
||||
|
||||
if (!remappedSources.exists() || refreshDeps) {
|
||||
if ((!remappedSources.exists() || refreshDeps) && !OperatingSystem.isCIBuild()) {
|
||||
File sources = findSources(dependencies, artifact);
|
||||
|
||||
if (sources != null) {
|
||||
@@ -180,9 +182,7 @@ public class ModCompileRemapper {
|
||||
private static void scheduleSourcesRemapping(Project project, SourceRemapper sourceRemapper, File sources, String remappedLog, File remappedSources) {
|
||||
project.getLogger().debug(":providing " + remappedLog + " sources");
|
||||
|
||||
boolean refreshDeps = project.getGradle().getStartParameter().isRefreshDependencies();
|
||||
|
||||
if (!remappedSources.exists() || sources.lastModified() <= 0 || sources.lastModified() > remappedSources.lastModified() || refreshDeps) {
|
||||
if (!remappedSources.exists() || sources.lastModified() <= 0 || sources.lastModified() > remappedSources.lastModified() || LoomGradlePlugin.refreshDeps) {
|
||||
sourceRemapper.scheduleRemapSources(sources, remappedSources, false, true); // Depenedency sources are used in ide only so don't need to be reproducable
|
||||
} else {
|
||||
project.getLogger().info(remappedSources.getName() + " is up to date with " + sources.getName());
|
||||
|
||||
Reference in New Issue
Block a user