downgrade to gradle 4.9, fix tiny-remapper deprecations, restore old dev/noclassifier behaviour for default RemapJarTask settings
parent
dba326147a
commit
ac9c7fc103
|
@ -12,7 +12,7 @@ targetCompatibility = 1.8
|
|||
|
||||
group = 'net.fabricmc'
|
||||
archivesBaseName = project.name
|
||||
version = '0.2.5-SNAPSHOT'
|
||||
version = '0.2.290-SNAPSHOT'
|
||||
|
||||
def build = "local"
|
||||
def ENV = System.getenv()
|
||||
|
@ -57,7 +57,7 @@ dependencies {
|
|||
|
||||
// Testing
|
||||
testImplementation(gradleTestKit())
|
||||
testImplementation("org.spockframework:spock-core:1.3-groovy-2.5")
|
||||
testImplementation("org.spockframework:spock-core:1.3-groovy-2.4")
|
||||
}
|
||||
|
||||
jar {
|
||||
|
@ -67,12 +67,12 @@ jar {
|
|||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
archiveClassifier = 'sources'
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
archiveClassifier = 'javadoc'
|
||||
classifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
|
|
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-rc-3-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
|
||||
|
|
|
@ -311,13 +311,14 @@ public class AbstractPlugin implements Plugin<Project> {
|
|||
|
||||
assert remapJarTask != null;
|
||||
if (!remapJarTask.getInput().isPresent()) {
|
||||
remapJarTask.getArchiveClassifier().set("remapped");
|
||||
remapJarTask.getInput().set(jarTask.getArchiveFile());
|
||||
jarTask.setClassifier("dev");
|
||||
remapJarTask.setClassifier("");
|
||||
remapJarTask.getInput().set(jarTask.getArchivePath());
|
||||
}
|
||||
|
||||
remapJarTask.getAddNestedDependencies().set(true);
|
||||
|
||||
remapJarTask.doLast(task -> project1.getArtifacts().add("archives", remapJarTask.getArchiveFile()));
|
||||
remapJarTask.doLast(task -> project1.getArtifacts().add("archives", remapJarTask.getArchivePath()));
|
||||
remapJarTask.dependsOn(project1.getTasks().getByName("jar"));
|
||||
project1.getTasks().getByName("build").dependsOn(remapJarTask);
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.fabricmc.tinyremapper.OutputConsumerPath;
|
|||
import net.fabricmc.tinyremapper.TinyRemapper;
|
||||
import net.fabricmc.tinyremapper.TinyUtils;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.file.RegularFile;
|
||||
import org.gradle.api.file.RegularFileProperty;
|
||||
import org.gradle.api.provider.Property;
|
||||
import org.gradle.api.tasks.Input;
|
||||
|
@ -53,7 +54,7 @@ public class RemapJarTask extends Jar {
|
|||
|
||||
public RemapJarTask() {
|
||||
super();
|
||||
input = getProject().getObjects().fileProperty();
|
||||
input = getProject().getLayout().fileProperty();
|
||||
addNestedDependencies = getProject().getObjects().property(Boolean.class);
|
||||
}
|
||||
|
||||
|
@ -62,7 +63,7 @@ public class RemapJarTask extends Jar {
|
|||
Project project = getProject();
|
||||
LoomGradleExtension extension = project.getExtensions().getByType(LoomGradleExtension.class);
|
||||
Path input = this.getInput().getAsFile().get().toPath();
|
||||
Path output = this.getArchiveFile().get().getAsFile().toPath();
|
||||
Path output = this.getArchivePath().toPath();
|
||||
|
||||
if (!Files.exists(input)) {
|
||||
throw new FileNotFoundException(input.toString());
|
||||
|
@ -98,7 +99,7 @@ public class RemapJarTask extends Jar {
|
|||
|
||||
TinyRemapper remapper = remapperBuilder.build();
|
||||
|
||||
try (OutputConsumerPath outputConsumer = new OutputConsumerPath(output)) {
|
||||
try (OutputConsumerPath outputConsumer = new OutputConsumerPath.Builder(output).build()) {
|
||||
outputConsumer.addNonClassFiles(input);
|
||||
remapper.readClassPath(classpath);
|
||||
remapper.readInputs(input);
|
||||
|
|
|
@ -66,7 +66,7 @@ public class MapJarsTiny {
|
|||
.rebuildSourceFilenames(true)
|
||||
.build();
|
||||
|
||||
try (OutputConsumerPath outputConsumer = new OutputConsumerPath(output)) {
|
||||
try (OutputConsumerPath outputConsumer = new OutputConsumerPath.Builder(output).build()) {
|
||||
outputConsumer.addNonClassFiles(input);
|
||||
remapper.readClassPath(classpath);
|
||||
remapper.readInputs(input);
|
||||
|
|
|
@ -167,7 +167,7 @@ public class ModProcessor {
|
|||
.withMappings(TinyRemapperMappingsHelper.create(mappingsProvider.getMappings(), fromM, toM))
|
||||
.build();
|
||||
|
||||
try (OutputConsumerPath outputConsumer = new OutputConsumerPath(Paths.get(output.getAbsolutePath()))) {
|
||||
try (OutputConsumerPath outputConsumer = new OutputConsumerPath.Builder(Paths.get(output.getAbsolutePath())).build()) {
|
||||
outputConsumer.addNonClassFiles(inputPath);
|
||||
remapper.readClassPath(modCompiles.toArray(new Path[0]));
|
||||
remapper.readClassPath(mc);
|
||||
|
|
|
@ -107,7 +107,7 @@ public class NestedJars {
|
|||
|
||||
for (Task task : remapJarTasks.isEmpty() ? jarTasks : remapJarTasks) {
|
||||
if (task instanceof RemapJarTask) {
|
||||
fileList.add(((RemapJarTask) task).getArchiveFile().get().getAsFile());
|
||||
fileList.add(((RemapJarTask) task).getArchivePath());
|
||||
} else if (task instanceof AbstractArchiveTask) {
|
||||
fileList.add(((AbstractArchiveTask) task).getArchivePath());
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ class EmptyBuildFunctionalTest extends Specification {
|
|||
.withProjectDir(testProjectDir.root)
|
||||
.withArguments('build')
|
||||
.withPluginClasspath()
|
||||
.withGradleVersion("5.1.1")
|
||||
.withGradleVersion("4.9")
|
||||
.build()
|
||||
|
||||
then:
|
||||
|
|
|
@ -62,7 +62,7 @@ class MixinBuildFunctionalTest extends Specification {
|
|||
.withProjectDir(testProjectDir.root)
|
||||
.withArguments('build')
|
||||
.withPluginClasspath()
|
||||
.withGradleVersion("5.1.1")
|
||||
.withGradleVersion("4.9")
|
||||
.build()
|
||||
|
||||
then:
|
||||
|
|
|
@ -47,7 +47,7 @@ class SimpleBuildFunctionalTest extends Specification {
|
|||
.withProjectDir(testProjectDir.root)
|
||||
.withArguments('build')
|
||||
.withPluginClasspath()
|
||||
.withGradleVersion("5.1.1")
|
||||
.withGradleVersion("4.9")
|
||||
.build()
|
||||
|
||||
then:
|
||||
|
|
Loading…
Reference in New Issue