aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/fabricmc/loom/configuration/CompileConfiguration.java3
-rw-r--r--src/main/java/net/fabricmc/loom/configuration/providers/LaunchProvider.java6
-rw-r--r--src/main/java/net/fabricmc/loom/util/Constants.java1
-rw-r--r--src/test/groovy/net/fabricmc/loom/EmptyBuildFunctionalTest.groovy2
-rw-r--r--src/test/groovy/net/fabricmc/loom/EmptyBuildMojangFunctionalTest.groovy2
-rw-r--r--src/test/groovy/net/fabricmc/loom/MixinBuildFunctionalTest.groovy2
-rw-r--r--src/test/groovy/net/fabricmc/loom/SimpleBuildFunctionalTest.groovy2
7 files changed, 11 insertions, 7 deletions
diff --git a/src/main/java/net/fabricmc/loom/configuration/CompileConfiguration.java b/src/main/java/net/fabricmc/loom/configuration/CompileConfiguration.java
index a8c52b5a..d75dd318 100644
--- a/src/main/java/net/fabricmc/loom/configuration/CompileConfiguration.java
+++ b/src/main/java/net/fabricmc/loom/configuration/CompileConfiguration.java
@@ -123,6 +123,7 @@ public final class CompileConfiguration {
project.getConfigurations().maybeCreate(Constants.Configurations.MAPPINGS);
project.getConfigurations().maybeCreate(Constants.Configurations.MAPPINGS_FINAL);
+ project.getConfigurations().maybeCreate(Constants.Configurations.LOOM_DEVELOPMENT_DEPENDENCIES);
for (RemappedConfigurationEntry entry : Constants.MOD_COMPILE_ENTRIES) {
Configuration compileModsConfig = project.getConfigurations().maybeCreate(entry.getSourceConfiguration());
@@ -147,6 +148,8 @@ public final class CompileConfiguration {
extendsFrom(Constants.Configurations.MINECRAFT_NAMED, Constants.Configurations.LOADER_DEPENDENCIES, project);
extendsFrom(JavaPlugin.IMPLEMENTATION_CONFIGURATION_NAME, Constants.Configurations.MAPPINGS_FINAL, project);
+
+ extendsFrom(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME, Constants.Configurations.LOOM_DEVELOPMENT_DEPENDENCIES, project);
}
/**
diff --git a/src/main/java/net/fabricmc/loom/configuration/providers/LaunchProvider.java b/src/main/java/net/fabricmc/loom/configuration/providers/LaunchProvider.java
index 9e11cb3a..0f3aef82 100644
--- a/src/main/java/net/fabricmc/loom/configuration/providers/LaunchProvider.java
+++ b/src/main/java/net/fabricmc/loom/configuration/providers/LaunchProvider.java
@@ -126,9 +126,9 @@ public class LaunchProvider extends DependencyProvider {
writeLog4jConfig();
FileUtils.writeStringToFile(getExtension().getDevLauncherConfig(), launchConfig.asString(), StandardCharsets.UTF_8);
- addDependency(Constants.Dependencies.DEV_LAUNCH_INJECTOR + Constants.Dependencies.Versions.DEV_LAUNCH_INJECTOR, JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME);
- addDependency(Constants.Dependencies.TERMINAL_CONSOLE_APPENDER + Constants.Dependencies.Versions.TERMINAL_CONSOLE_APPENDER, JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME);
- annotationDependency = addDependency(Constants.Dependencies.JETBRAINS_ANNOTATIONS + Constants.Dependencies.Versions.JETBRAINS_ANNOTATIONS, "compileOnly");
+ addDependency(Constants.Dependencies.DEV_LAUNCH_INJECTOR + Constants.Dependencies.Versions.DEV_LAUNCH_INJECTOR, Constants.Configurations.LOOM_DEVELOPMENT_DEPENDENCIES);
+ addDependency(Constants.Dependencies.TERMINAL_CONSOLE_APPENDER + Constants.Dependencies.Versions.TERMINAL_CONSOLE_APPENDER, Constants.Configurations.LOOM_DEVELOPMENT_DEPENDENCIES);
+ annotationDependency = addDependency(Constants.Dependencies.JETBRAINS_ANNOTATIONS + Constants.Dependencies.Versions.JETBRAINS_ANNOTATIONS, JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME);
if (getExtension().isForge()) {
addDependency(Constants.Dependencies.JAVAX_ANNOTATIONS + Constants.Dependencies.Versions.JAVAX_ANNOTATIONS, "compileOnly");
diff --git a/src/main/java/net/fabricmc/loom/util/Constants.java b/src/main/java/net/fabricmc/loom/util/Constants.java
index 60c6c2f5..175cbdb3 100644
--- a/src/main/java/net/fabricmc/loom/util/Constants.java
+++ b/src/main/java/net/fabricmc/loom/util/Constants.java
@@ -77,6 +77,7 @@ public class Constants {
public static final String MAPPINGS = "mappings";
public static final String MAPPINGS_FINAL = "mappingsFinal";
public static final String LOADER_DEPENDENCIES = "loaderLibraries";
+ public static final String LOOM_DEVELOPMENT_DEPENDENCIES = "loomDevelopmentDependencies";
public static final String SRG = "srg";
public static final String MCP_CONFIG = "mcp";
public static final String FORGE = "forge";
diff --git a/src/test/groovy/net/fabricmc/loom/EmptyBuildFunctionalTest.groovy b/src/test/groovy/net/fabricmc/loom/EmptyBuildFunctionalTest.groovy
index 6980d780..996ab656 100644
--- a/src/test/groovy/net/fabricmc/loom/EmptyBuildFunctionalTest.groovy
+++ b/src/test/groovy/net/fabricmc/loom/EmptyBuildFunctionalTest.groovy
@@ -35,7 +35,7 @@ class EmptyBuildFunctionalTest extends Specification {
when:
def result = GradleRunner.create()
.withProjectDir(testProjectDir.root)
- .withArguments('build',"--stacktrace")
+ .withArguments('build',"--stacktrace", "--warning-mode", System.getenv().TEST_WARNING_MODE ?: 'all')
.withPluginClasspath()
.forwardOutput()
.build()
diff --git a/src/test/groovy/net/fabricmc/loom/EmptyBuildMojangFunctionalTest.groovy b/src/test/groovy/net/fabricmc/loom/EmptyBuildMojangFunctionalTest.groovy
index a49c3880..d360ba6f 100644
--- a/src/test/groovy/net/fabricmc/loom/EmptyBuildMojangFunctionalTest.groovy
+++ b/src/test/groovy/net/fabricmc/loom/EmptyBuildMojangFunctionalTest.groovy
@@ -35,7 +35,7 @@ class EmptyBuildMojangFunctionalTest extends Specification {
when:
def result = GradleRunner.create()
.withProjectDir(testProjectDir.root)
- .withArguments('build',"--stacktrace")
+ .withArguments('build',"--stacktrace", "--warning-mode", System.getenv().TEST_WARNING_MODE ?: 'all')
.withPluginClasspath()
.forwardOutput()
.build()
diff --git a/src/test/groovy/net/fabricmc/loom/MixinBuildFunctionalTest.groovy b/src/test/groovy/net/fabricmc/loom/MixinBuildFunctionalTest.groovy
index 6b0ae6d8..b40a2ba7 100644
--- a/src/test/groovy/net/fabricmc/loom/MixinBuildFunctionalTest.groovy
+++ b/src/test/groovy/net/fabricmc/loom/MixinBuildFunctionalTest.groovy
@@ -54,7 +54,7 @@ class MixinBuildFunctionalTest extends Specification {
when:
def result = GradleRunner.create()
.withProjectDir(testProjectDir.root)
- .withArguments('build','--stacktrace')
+ .withArguments('build','--stacktrace', "--warning-mode", System.getenv().TEST_WARNING_MODE ?: 'all')
.withPluginClasspath()
.forwardOutput()
.build()
diff --git a/src/test/groovy/net/fabricmc/loom/SimpleBuildFunctionalTest.groovy b/src/test/groovy/net/fabricmc/loom/SimpleBuildFunctionalTest.groovy
index b1182d9f..756a3faa 100644
--- a/src/test/groovy/net/fabricmc/loom/SimpleBuildFunctionalTest.groovy
+++ b/src/test/groovy/net/fabricmc/loom/SimpleBuildFunctionalTest.groovy
@@ -45,7 +45,7 @@ class SimpleBuildFunctionalTest extends Specification {
when:
def result = GradleRunner.create()
.withProjectDir(testProjectDir.root)
- .withArguments('build',"--stacktrace")
+ .withArguments('build',"--stacktrace", "--warning-mode", System.getenv().TEST_WARNING_MODE ?: 'all')
.withPluginClasspath()
.forwardOutput()
.withDebug(true)