Merge remote-tracking branch 'FabricMC/exp/0.11' into dev/0.11.0

# Conflicts:
#	.github/workflows/publish.yml
#	.github/workflows/test.yml
#	bootstrap/test-project/build.gradle
#	build.gradle
#	src/main/java/net/fabricmc/loom/api/LoomGradleExtensionAPI.java
#	src/main/java/net/fabricmc/loom/extension/MinecraftGradleExtension.java
#	src/main/java/net/fabricmc/loom/util/Constants.java
This commit is contained in:
shedaniel
2021-12-08 22:06:34 +08:00
19 changed files with 45 additions and 472 deletions

View File

@@ -8,6 +8,7 @@ on:
- 'dev/0.8'
- 'dev/0.9'
- 'dev/0.10.0'
- 'dev/0.11.0'
jobs:
build:
@@ -16,10 +17,10 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Set up JDK 16
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 16
java-version: 17
- name: Upload to Maven
run: ./gradlew publish --stacktrace
env:

View File

@@ -5,7 +5,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [ 7.0.0-jdk16 , 7.2-jdk17 ]
version: [ 7.3.1-jdk17 ]
runs-on: ubuntu-20.04
container:
image: gradle:${{ matrix.version }}
@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-20.04
container:
image: gradle:7.0.1-jdk16
image: gradle:7.3.1-jdk17
options: --user root
steps:
@@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [7.0.0-jdk16 , 7.2-jdk17]
version: [7.3.1-jdk17]
test: ${{ fromJson(needs.prepare_test_matrix.outputs.matrix) }}
runs-on: ubuntu-20.04
@@ -66,10 +66,10 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ 16 ]
java: [ 17 ]
test: ${{ fromJson(needs.prepare_test_matrix.outputs.matrix) }}
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v2

View File

@@ -14,7 +14,7 @@ import org.gradle.util.GradleVersion;
@SuppressWarnings("unused")
public class LoomGradlePluginBootstrap implements Plugin<PluginAware> {
private static final int MIN_SUPPORTED_MAJOR_GRADLE_VERSION = 7;
private static final int MIN_SUPPORTED_MAJOR_JAVA_VERSION = 16;
private static final int MIN_SUPPORTED_MAJOR_JAVA_VERSION = 17;
private static final int MIN_SUPPORTED_MAJOR_IDEA_VERSION = 2021;
private static final String PLUGIN_CLASS_NAME = "net.fabricmc.loom.LoomGradlePlugin";

View File

@@ -1,5 +1,5 @@
plugins {
id 'dev.architectury.loom' version '0.10.local'
id 'dev.architectury.loom' version '0.11.local'
}
dependencies {

View File

@@ -13,17 +13,17 @@ plugins {
id 'me.shedaniel.java-version-bridge' version '1.0-SNAPSHOT'
}
sourceCompatibility = 16
targetCompatibility = 16
sourceCompatibility = 17
targetCompatibility = 17
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 16
it.options.release = 17
}
group = "dev.architectury"
archivesBaseName = project.name
def baseVersion = '0.10.0'
def baseVersion = '0.11.0'
def runNumber = System.getenv("GITHUB_RUN_NUMBER") ?: "9999"
def isSnapshot = System.getenv("PR_NUM") != null
@@ -73,10 +73,10 @@ dependencies {
bootstrap project(":bootstrap")
// libraries
implementation ('commons-io:commons-io:2.8.0')
implementation ('com.google.code.gson:gson:2.8.8')
implementation ('com.fasterxml.jackson.core:jackson-databind:2.12.5')
implementation ('com.google.guava:guava:30.1.1-jre')
implementation ('commons-io:commons-io:2.11.0')
implementation ('com.google.code.gson:gson:2.8.9')
implementation ('com.fasterxml.jackson.core:jackson-databind:2.13.0')
implementation ('com.google.guava:guava:31.0.1-jre')
implementation ('org.ow2.asm:asm:9.2')
implementation ('org.ow2.asm:asm-analysis:9.2')
implementation ('org.ow2.asm:asm-commons:9.2')
@@ -109,7 +109,7 @@ dependencies {
// Kapt integration
compileOnly('org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21')
compileOnly('org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0')
// Forge patches
implementation ('net.minecraftforge:installertools:1.2.0')
@@ -127,7 +127,7 @@ dependencies {
testImplementation 'io.javalin:javalin:3.13.11'
testImplementation 'net.fabricmc:fabric-installer:0.9.0'
compileOnly 'org.jetbrains:annotations:22.0.0'
compileOnly 'org.jetbrains:annotations:23.0.0'
}
blossom {
@@ -180,11 +180,11 @@ spotless {
checkstyle {
configFile = file('checkstyle.xml')
toolVersion = '8.44'
toolVersion = '9.2'
}
codenarc {
toolVersion = "2.1.0"
toolVersion = "2.2.0"
configFile = file("codenarc.groovy")
}
@@ -200,7 +200,7 @@ gradlePlugin {
build.dependsOn downgradeJava
jacoco {
toolVersion = "0.8.6"
toolVersion = "0.8.7"
}
// Run to get test coverage.

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -46,7 +46,6 @@ import net.fabricmc.loom.configuration.ide.IdeConfiguration;
import net.fabricmc.loom.decompilers.DecompilerConfiguration;
import net.fabricmc.loom.extension.LoomFiles;
import net.fabricmc.loom.extension.LoomGradleExtensionImpl;
import net.fabricmc.loom.extension.MinecraftGradleExtension;
import net.fabricmc.loom.task.LoomTasks;
public class LoomGradlePlugin implements BootstrappedPlugin {
@@ -84,9 +83,8 @@ public class LoomGradlePlugin implements BootstrappedPlugin {
project.apply(ImmutableMap.of("plugin", "eclipse"));
project.apply(ImmutableMap.of("plugin", "idea"));
// Setup extensions, minecraft wraps loom
LoomGradleExtensionAPI extension = project.getExtensions().create(LoomGradleExtensionAPI.class, "loom", LoomGradleExtensionImpl.class, project, LoomFiles.create(project));
project.getExtensions().create(LoomGradleExtensionAPI.class, "minecraft", MinecraftGradleExtension.class, extension);
// Setup extensions
project.getExtensions().create(LoomGradleExtensionAPI.class, "loom", LoomGradleExtensionImpl.class, project, LoomFiles.create(project));
project.getExtensions().create("fabricApi", FabricApiExtension.class, project);
CompileConfiguration.setupConfigurations(project);

View File

@@ -24,7 +24,6 @@
package net.fabricmc.loom.api;
import java.io.File;
import java.util.List;
import java.util.function.Consumer;
@@ -58,62 +57,20 @@ public interface LoomGradleExtensionAPI {
RegularFileProperty getAccessWidenerPath();
@Deprecated(forRemoval = true)
@ApiStatus.ScheduledForRemoval(inVersion = "0.11")
default File getAccessWidener() {
getDeprecationHelper().replaceWithInLoom0_11("accessWidener", "accessWidenerPath");
return getAccessWidenerPath().getAsFile().getOrNull();
}
@Deprecated(forRemoval = true)
@ApiStatus.ScheduledForRemoval(inVersion = "0.11")
default void setAccessWidener(File file) {
getDeprecationHelper().replaceWithInLoom0_11("accessWidener", "accessWidenerPath");
getAccessWidenerPath().set(file);
}
Property<Boolean> getShareRemapCaches();
@Deprecated(forRemoval = true)
@ApiStatus.ScheduledForRemoval(inVersion = "0.11")
default void setShareCaches(boolean shareCaches) {
getDeprecationHelper().replaceWithInLoom0_11("shareCaches", "shareRemapCaches");
getShareRemapCaches().set(shareCaches);
}
@Deprecated(forRemoval = true)
@ApiStatus.ScheduledForRemoval(inVersion = "0.11")
default boolean isShareCaches() {
getDeprecationHelper().replaceWithInLoom0_11("shareCaches", "shareRemapCaches");
return getShareRemapCaches().get();
}
default void shareCaches() {
getShareRemapCaches().set(true);
}
ListProperty<LoomDecompiler> getGameDecompilers();
@Deprecated(forRemoval = true)
@ApiStatus.ScheduledForRemoval(inVersion = "0.11")
default List<LoomDecompiler> getDecompilers() {
getDeprecationHelper().replaceWithInLoom0_11("decompilers", "gameDecompilers");
return getGameDecompilers().get();
}
default void addDecompiler(LoomDecompiler decompiler) {
getGameDecompilers().add(decompiler);
}
ListProperty<JarProcessor> getGameJarProcessors();
@Deprecated(forRemoval = true)
@ApiStatus.ScheduledForRemoval(inVersion = "0.11")
default List<JarProcessor> getJarProcessors() {
getDeprecationHelper().replaceWithInLoom0_11("jarProcessors", "gameJarProcessors");
return getGameJarProcessors().get();
}
default void addJarProcessor(JarProcessor processor) {
getGameJarProcessors().add(processor);
}
@@ -126,36 +83,8 @@ public interface LoomGradleExtensionAPI {
Dependency layered(Action<LayeredMappingSpecBuilder> action);
@Deprecated(forRemoval = true)
@ApiStatus.ScheduledForRemoval(inVersion = "0.11")
default String getRefmapName() {
getDeprecationHelper().replaceWithInLoom0_11("refmapName", "mixin.defaultRefmapName");
return getMixin().getDefaultRefmapName().get();
}
@Deprecated(forRemoval = true)
@ApiStatus.ScheduledForRemoval(inVersion = "0.11")
default void setRefmapName(String refmapName) {
getDeprecationHelper().replaceWithInLoom0_11("refmapName", "mixin.defaultRefmapName");
getMixin().getDefaultRefmapName().set(refmapName);
}
Property<Boolean> getRemapArchives();
@Deprecated(forRemoval = true)
@ApiStatus.ScheduledForRemoval(inVersion = "0.11")
default boolean isRemapMod() {
getDeprecationHelper().replaceWithInLoom0_11("remapMod", "remapArchives");
return getRemapArchives().get();
}
@Deprecated(forRemoval = true)
@ApiStatus.ScheduledForRemoval(inVersion = "0.11")
default void setRemapMod(boolean remapMod) {
getDeprecationHelper().replaceWithInLoom0_11("remapMod", "remapArchives");
getRemapArchives().set(remapMod);
}
void runs(Action<NamedDomainObjectContainer<RunConfigSettings>> action);
NamedDomainObjectContainer<RunConfigSettings> getRunConfigs();
@@ -168,20 +97,6 @@ public interface LoomGradleExtensionAPI {
Property<String> getCustomMinecraftManifest();
@Deprecated(forRemoval = true)
@ApiStatus.ScheduledForRemoval(inVersion = "0.11")
default void setCustomManifest(String customManifest) {
getDeprecationHelper().replaceWithInLoom0_11("customManifest", "customMinecraftManifest");
getCustomMinecraftManifest().set(customManifest);
}
@Deprecated(forRemoval = true)
@ApiStatus.ScheduledForRemoval(inVersion = "0.11")
default String getCustomManifest() {
getDeprecationHelper().replaceWithInLoom0_11("customManifest", "customMinecraftManifest");
return getCustomMinecraftManifest().getOrNull();
}
/**
* If true, Loom will replace the {@code -dev} jars in the {@code *Elements} configurations
* with remapped outgoing variants.

View File

@@ -157,11 +157,6 @@ public class ModCompileRemapper {
project.getDependencies().add(info.targetConfig.getName(), info.getRemappedNotation());
}
// Report deprecation warnings
if (entry.replacedWith() != null && !modDependencies.isEmpty()) {
extension.getDeprecationHelper().replaceWithInLoom0_11(entry.sourceConfiguration(), entry.replacedWith());
}
// Export to other projects
if (entry.targetConfiguration().equals(JavaPlugin.API_CONFIGURATION_NAME)) {
project.getConfigurations().getByName(Constants.Configurations.NAMED_ELEMENTS).extendsFrom(remappedConfig);

View File

@@ -28,13 +28,8 @@ import java.util.Set;
import org.gradle.api.artifacts.ConfigurationContainer;
import org.gradle.api.plugins.JavaPlugin;
import org.jetbrains.annotations.Nullable;
public record RemappedConfigurationEntry(String sourceConfiguration, String targetConfiguration, boolean compileClasspath, boolean runtimeClasspath, PublishingMode publishingMode, @Nullable String replacedWith) {
public RemappedConfigurationEntry(String sourceConfiguration, String targetConfiguration, boolean compileClasspath, boolean runtimeClasspath, PublishingMode publishingMode) {
this(sourceConfiguration, targetConfiguration, compileClasspath, runtimeClasspath, publishingMode, null);
}
public record RemappedConfigurationEntry(String sourceConfiguration, String targetConfiguration, boolean compileClasspath, boolean runtimeClasspath, PublishingMode publishingMode) {
public String getRemappedConfiguration() {
return sourceConfiguration + "Mapped";
}

View File

@@ -27,8 +27,7 @@ package net.fabricmc.loom.configuration.providers.mappings.mojmap;
import net.fabricmc.loom.api.mappings.layered.spec.MojangMappingsSpecBuilder;
public class MojangMappingsSpecBuilderImpl implements MojangMappingsSpecBuilder {
// TODO 0.11 loom change default to false
private boolean nameSyntheticMembers = true;
private boolean nameSyntheticMembers = false;
private MojangMappingsSpecBuilderImpl() {
}

View File

@@ -1,246 +0,0 @@
/*
* This file is part of fabric-loom, licensed under the MIT License (MIT).
*
* Copyright (c) 2021 FabricMC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package net.fabricmc.loom.extension;
import java.util.List;
import java.util.function.Consumer;
import org.gradle.api.Action;
import org.gradle.api.NamedDomainObjectContainer;
import org.gradle.api.artifacts.Dependency;
import org.gradle.api.file.ConfigurableFileCollection;
import org.gradle.api.file.RegularFileProperty;
import org.gradle.api.provider.ListProperty;
import org.gradle.api.provider.Property;
import org.gradle.api.provider.Provider;
import org.gradle.api.publish.maven.MavenPublication;
import net.fabricmc.loom.api.ForgeExtensionAPI;
import net.fabricmc.loom.api.LoomGradleExtensionAPI;
import net.fabricmc.loom.api.MixinExtensionAPI;
import net.fabricmc.loom.api.decompilers.LoomDecompiler;
import net.fabricmc.loom.api.decompilers.architectury.ArchitecturyLoomDecompiler;
import net.fabricmc.loom.api.mappings.layered.spec.LayeredMappingSpecBuilder;
import net.fabricmc.loom.configuration.ide.RunConfig;
import net.fabricmc.loom.configuration.ide.RunConfigSettings;
import net.fabricmc.loom.configuration.launch.LaunchProviderSettings;
import net.fabricmc.loom.configuration.processors.JarProcessor;
import net.fabricmc.loom.util.DeprecationHelper;
import net.fabricmc.loom.util.ModPlatform;
public class MinecraftGradleExtension implements LoomGradleExtensionAPI {
private final LoomGradleExtensionAPI parent;
private boolean deprecationReported = false;
public MinecraftGradleExtension(LoomGradleExtensionAPI parent) {
this.parent = parent;
}
private void reportDeprecation() {
if (!deprecationReported) {
getDeprecationHelper().replaceWithInLoom0_11("minecraft", "loom");
deprecationReported = true;
}
}
@Override
public DeprecationHelper getDeprecationHelper() {
return parent.getDeprecationHelper();
}
@Override
public RegularFileProperty getAccessWidenerPath() {
reportDeprecation();
return parent.getAccessWidenerPath();
}
@Override
public Property<Boolean> getShareRemapCaches() {
reportDeprecation();
return parent.getShareRemapCaches();
}
@Override
public ListProperty<LoomDecompiler> getGameDecompilers() {
reportDeprecation();
return parent.getGameDecompilers();
}
@Override
public ListProperty<JarProcessor> getGameJarProcessors() {
reportDeprecation();
return parent.getGameJarProcessors();
}
@Override
public ConfigurableFileCollection getLog4jConfigs() {
reportDeprecation();
return parent.getLog4jConfigs();
}
@Override
public Dependency layered(Action<LayeredMappingSpecBuilder> action) {
reportDeprecation();
return parent.layered(action);
}
@Override
public Property<Boolean> getRemapArchives() {
reportDeprecation();
return parent.getRemapArchives();
}
@Override
public void runs(Action<NamedDomainObjectContainer<RunConfigSettings>> action) {
reportDeprecation();
parent.runs(action);
}
@Override
public NamedDomainObjectContainer<RunConfigSettings> getRunConfigs() {
reportDeprecation();
return parent.getRunConfigs();
}
@Override
public void mixin(Action<MixinExtensionAPI> action) {
reportDeprecation();
parent.mixin(action);
}
@Override
public MixinExtensionAPI getMixin() {
reportDeprecation();
return parent.getMixin();
}
@Override
public Property<String> getCustomMinecraftManifest() {
reportDeprecation();
return parent.getCustomMinecraftManifest();
}
@Override
public Property<Boolean> getSetupRemappedVariants() {
reportDeprecation();
return parent.getSetupRemappedVariants();
}
@Override
public void disableDeprecatedPomGeneration(MavenPublication publication) {
reportDeprecation();
parent.disableDeprecatedPomGeneration(publication);
}
@Override
public String getModVersion() {
reportDeprecation();
throw new UnsupportedOperationException("Use loom extension");
}
@Override
public Property<Boolean> getEnableTransitiveAccessWideners() {
reportDeprecation();
throw new UnsupportedOperationException();
}
@Override
public Property<String> getIntermediaryUrl() {
reportDeprecation();
return parent.getIntermediaryUrl();
}
@Override
public ListProperty<ArchitecturyLoomDecompiler> getArchGameDecompilers() {
reportDeprecation();
return parent.getArchGameDecompilers();
}
@Override
public void silentMojangMappingsLicense() {
reportDeprecation();
parent.silentMojangMappingsLicense();
}
@Override
public boolean isSilentMojangMappingsLicenseEnabled() {
reportDeprecation();
return parent.isSilentMojangMappingsLicenseEnabled();
}
@Override
public Provider<ModPlatform> getPlatform() {
reportDeprecation();
return parent.getPlatform();
}
@Override
public void setGenerateSrgTiny(Boolean generateSrgTiny) {
reportDeprecation();
parent.setGenerateSrgTiny(generateSrgTiny);
}
@Override
public boolean shouldGenerateSrgTiny() {
reportDeprecation();
return parent.shouldGenerateSrgTiny();
}
@Override
public void launches(Action<NamedDomainObjectContainer<LaunchProviderSettings>> action) {
reportDeprecation();
parent.launches(action);
}
@Override
public NamedDomainObjectContainer<LaunchProviderSettings> getLaunchConfigs() {
reportDeprecation();
return parent.getLaunchConfigs();
}
@Override
public List<String> getTasksBeforeRun() {
reportDeprecation();
return parent.getTasksBeforeRun();
}
@Override
public List<Consumer<RunConfig>> getSettingsPostEdit() {
reportDeprecation();
return parent.getSettingsPostEdit();
}
@Override
public ForgeExtensionAPI getForge() {
reportDeprecation();
return parent.getForge();
}
@Override
public void forge(Action<ForgeExtensionAPI> action) {
reportDeprecation();
parent.forge(action);
}
}

View File

@@ -31,6 +31,7 @@ import java.io.UncheckedIOException;
import com.google.common.base.Preconditions;
import org.gradle.api.Project;
import org.gradle.api.tasks.TaskContainer;
import org.gradle.api.tasks.TaskProvider;
import net.fabricmc.loom.LoomGradleExtension;
import net.fabricmc.loom.api.decompilers.LoomDecompiler;
@@ -60,12 +61,12 @@ public final class LoomTasks {
tasks.register("downloadAssets", DownloadAssetsTask.class, t -> t.setDescription("Downloads required assets for Fabric."));
tasks.register("remapSourcesJar", RemapSourcesJarTask.class, t -> t.setDescription("Remaps the project sources jar to intermediary names."));
tasks.getByName("check").dependsOn(
tasks.register("validateAccessWidener", ValidateAccessWidenerTask.class, t -> {
t.setDescription("Validate all the rules in the access widener against the Minecraft jar");
t.setGroup("verification");
})
);
TaskProvider<ValidateAccessWidenerTask> validateAccessWidener = tasks.register("validateAccessWidener", ValidateAccessWidenerTask.class, t -> {
t.setDescription("Validate all the rules in the access widener against the Minecraft jar");
t.setGroup("verification");
});
tasks.named("check").configure(task -> task.dependsOn(validateAccessWidener));
registerIDETasks(tasks);
registerRunTasks(tasks, project);
@@ -184,8 +185,10 @@ public final class LoomTasks {
task.getInputJar().set(inputJar);
if (mappingsProvider.hasUnpickDefinitions()) {
task.dependsOn(tasks.getByName("unpickJar"));
task.dependsOn(tasks.named("unpickJar"));
}
task.dependsOn(tasks.named("validateAccessWidener"));
});
}
@@ -207,7 +210,7 @@ public final class LoomTasks {
task.setDescription("Decompile minecraft using the default decompiler.");
task.setGroup(Constants.TaskGroup.FABRIC);
task.dependsOn(project.getTasks().getByName("genSourcesWithCfr"));
task.dependsOn(project.getTasks().named("genSourcesWithCfr"));
});
});
}

View File

@@ -1,39 +0,0 @@
/*
* This file is part of fabric-loom, licensed under the MIT License (MIT).
*
* Copyright (c) 2016-2021 FabricMC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package net.fabricmc.loom.task;
import net.fabricmc.loom.LoomGradleExtension;
import net.fabricmc.loom.configuration.ide.RunConfig;
@Deprecated // Replaced by RunGameTask
public class RunClientTask extends AbstractRunTask {
public RunClientTask() {
super(project -> {
LoomGradleExtension extension = LoomGradleExtension.get(project);
return RunConfig.runConfig(project, extension.getRunConfigs().getByName("client"));
});
LoomGradleExtension.get(getProject()).getDeprecationHelper().replaceWithInLoom0_11("RunClientTask", "RunGameTask");
}
}

View File

@@ -1,39 +0,0 @@
/*
* This file is part of fabric-loom, licensed under the MIT License (MIT).
*
* Copyright (c) 2016-2021 FabricMC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package net.fabricmc.loom.task;
import net.fabricmc.loom.LoomGradleExtension;
import net.fabricmc.loom.configuration.ide.RunConfig;
@Deprecated // Replaced by RunGameTask
public class RunServerTask extends AbstractRunTask {
public RunServerTask() {
super(project -> {
LoomGradleExtension extension = LoomGradleExtension.get(project);
return RunConfig.runConfig(project, extension.getRunConfigs().getByName("client"));
});
LoomGradleExtension.get(getProject()).getDeprecationHelper().replaceWithInLoom0_11("RunServerTask", "RunGameTask");
}
}

View File

@@ -48,7 +48,6 @@ public class Constants {
public static final List<RemappedConfigurationEntry> MOD_COMPILE_ENTRIES = ImmutableList.of(
new RemappedConfigurationEntry("modApi", JavaPlugin.API_CONFIGURATION_NAME, true, true, PublishingMode.COMPILE_AND_RUNTIME),
new RemappedConfigurationEntry("modImplementation", JavaPlugin.IMPLEMENTATION_CONFIGURATION_NAME, true, true, PublishingMode.RUNTIME_ONLY),
new RemappedConfigurationEntry("modRuntime", JavaPlugin.RUNTIME_ONLY_CONFIGURATION_NAME, false, true, PublishingMode.NONE, "modRuntimeOnly"),
new RemappedConfigurationEntry("modCompileOnly", JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME, true, false, PublishingMode.NONE),
new RemappedConfigurationEntry("modCompileOnlyApi", JavaPlugin.COMPILE_ONLY_API_CONFIGURATION_NAME, true, false, PublishingMode.COMPILE_ONLY),
new RemappedConfigurationEntry("modRuntimeOnly", JavaPlugin.RUNTIME_ONLY_CONFIGURATION_NAME, false, true, PublishingMode.RUNTIME_ONLY),
@@ -118,7 +117,7 @@ public class Constants {
public static final String MIXIN_COMPILE_EXTENSIONS = "0.4.6";
public static final String DEV_LAUNCH_INJECTOR = "0.2.1+build.8";
public static final String TERMINAL_CONSOLE_APPENDER = "1.2.0";
public static final String JETBRAINS_ANNOTATIONS = "22.0.0";
public static final String JETBRAINS_ANNOTATIONS = "23.0.0";
public static final String JAVAX_ANNOTATIONS = "3.0.2";
public static final String FORGE_RUNTIME = "1.1.3";
public static final String ACCESS_TRANSFORMERS = "3.0.1";

View File

@@ -31,14 +31,6 @@ import org.gradle.api.logging.LogLevel;
import org.gradle.api.logging.configuration.WarningMode;
public interface DeprecationHelper {
default void replaceWithInLoom0_10(String currentName, String newName) {
toBeRemovedIn(currentName, newName, "Loom 0.10");
}
default void replaceWithInLoom0_11(String currentName, String newName) {
toBeRemovedIn(currentName, newName, "Loom 0.11");
}
default void replaceWithInLoom0_12(String currentName, String newName) {
toBeRemovedIn(currentName, newName, "Loom 0.12");
}

View File

@@ -28,7 +28,7 @@ import org.gradle.util.GradleVersion
class LoomTestConstants {
public final static String DEFAULT_GRADLE = GradleVersion.current().getVersion()
public final static String PRE_RELEASE_GRADLE = "7.4-20211201231918+0000"
public final static String PRE_RELEASE_GRADLE = "7.4-20211203231050+0000"
public final static String[] STANDARD_TEST_VERSIONS = [DEFAULT_GRADLE, PRE_RELEASE_GRADLE]
}

View File

@@ -41,7 +41,7 @@ class LayeredMappingSpecBuilderTest extends LayeredMappingsSpecification {
}
def layers = spec.layers()
then:
spec.version == "layered+hash.2192"
spec.version == "layered+hash.2198"
layers.size() == 2
layers[0].class == IntermediaryMappingsSpec
layers[1].class == MojangMappingsSpec
@@ -56,7 +56,7 @@ class LayeredMappingSpecBuilderTest extends LayeredMappingsSpecification {
def layers = spec.layers()
def parchment = layers[2] as ParchmentMappingsSpec
then:
spec.version == "layered+hash.863752565"
spec.version == "layered+hash.863752751"
layers.size() == 3
layers[0].class == IntermediaryMappingsSpec
layers[1].class == MojangMappingsSpec
@@ -76,7 +76,7 @@ class LayeredMappingSpecBuilderTest extends LayeredMappingsSpecification {
def layers = spec.layers()
def parchment = layers[2] as ParchmentMappingsSpec
then:
spec.version == "layered+hash.863752571"
spec.version == "layered+hash.863752757"
layers.size() == 3
layers[0].class == IntermediaryMappingsSpec
layers[1].class == MojangMappingsSpec
@@ -96,7 +96,7 @@ class LayeredMappingSpecBuilderTest extends LayeredMappingsSpecification {
def layers = spec.layers()
def parchment = layers[2] as ParchmentMappingsSpec
then:
spec.version == "layered+hash.1144427326"
spec.version == "layered+hash.1144427140"
layers.size() == 3
layers[0].class == IntermediaryMappingsSpec
layers[1].class == MojangMappingsSpec