Merge remote-tracking branch 'FabricMC/dev/0.6' into dev/0.6-forge

# Conflicts:
#	.github/workflows/test-push.yml
#	build.gradle
#	src/main/java/net/fabricmc/loom/util/Constants.java
This commit is contained in:
shedaniel
2021-02-20 18:29:31 +08:00
8 changed files with 15 additions and 14 deletions

View File

@@ -6,6 +6,7 @@ plugins {
id 'eclipse'
id 'groovy'
id 'checkstyle'
id "org.cadixdev.licenser" version "0.5.0"
id 'com.github.johnrengelman.shadow' version '4.0.4'
}
@@ -130,7 +131,7 @@ jar {
}
manifest {
attributes 'Implementation-Version': version + ' Build(' + build + ')'
attributes 'Implementation-Version': project.version + ' Build(' + build + ')'
}
}
@@ -144,9 +145,9 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
}
apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/license.gradle'
license {
header rootProject.file("HEADER")
include "**/*.java"
exclude '**/loom/util/DownloadUtil.java'
exclude '**/loom/util/FileSystemUtil.java'
exclude '**/loom/inject/mixin/MixinIntermediaryDevRemapper.java'
@@ -157,10 +158,6 @@ checkstyle {
toolVersion = '8.39'
}
checkstyleMain {
logging.setLevel(LogLevel.LIFECYCLE)
}
gradlePlugin {
plugins {
fabricLoom {

View File

@@ -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);
}
/**

View File

@@ -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");

View File

@@ -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";

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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)