Fix mod* configurations not being on the test compile/runtime configuration. Closes #488

dev/0.11
modmuss50 2021-10-12 13:31:12 +01:00
parent 1c208f99b4
commit 6666b95b54
3 changed files with 15 additions and 1 deletions

View File

@ -77,10 +77,12 @@ public final class CompileConfiguration {
extendsFrom(Constants.Configurations.MOD_COMPILE_CLASSPATH, entry.sourceConfiguration(), project);
extendsFrom(Constants.Configurations.MOD_COMPILE_CLASSPATH_MAPPED, entry.getRemappedConfiguration(), project);
extendsFrom(JavaPlugin.COMPILE_CLASSPATH_CONFIGURATION_NAME, entry.getRemappedConfiguration(), project);
extendsFrom(JavaPlugin.TEST_COMPILE_CLASSPATH_CONFIGURATION_NAME, entry.getRemappedConfiguration(), project);
}
if (entry.runtimeClasspath()) {
extendsFrom(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME, entry.getRemappedConfiguration(), project);
extendsFrom(JavaPlugin.TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME, entry.getRemappedConfiguration(), project);
}
if (entry.hasConsumerConfiguration()) {

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-20211007220130+0000"
public final static String PRE_RELEASE_GRADLE = "7.4-20211011231946+0000"
public final static String[] STANDARD_TEST_VERSIONS = [DEFAULT_GRADLE, PRE_RELEASE_GRADLE]
}

View File

@ -0,0 +1,12 @@
package net.fabricmc.example.test;
import net.fabricmc.api.ModInitializer;
import net.minecraft.client.gui.screen.TitleScreen;
// Just a simple class to ensure the tests can compile against loader and minecraft
public class ExampleMod implements ModInitializer {
@Override
public void onInitialize() {
TitleScreen screen = null;
}
}