Fix crash when resolving libs of new snapshot.
parent
d4792dd0af
commit
29631ad1bb
|
@ -15,7 +15,7 @@ apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/license.g
|
|||
|
||||
group = 'net.fabricmc'
|
||||
archivesBaseName = project.name.toLowerCase()
|
||||
version = '0.0.6-SNAPSHOT'
|
||||
version = '0.0.7-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
|
|
@ -233,7 +233,7 @@ public class AbstractPlugin implements Plugin<Project> {
|
|||
for (Version.Library library : version.libraries) {
|
||||
if (library.allowed() && library.getFile(extension) != null) {
|
||||
String configName = Constants.CONFIG_MC_DEPENDENCIES;
|
||||
if (library.name.contains("java3d") || library.name.contains("paulscode") || library.name.contains("lwjgl") || library.name.contains("twitch") || library.name.contains("jinput")) {
|
||||
if (library.name.contains("java3d") || library.name.contains("paulscode") || library.name.contains("lwjgl") || library.name.contains("twitch") || library.name.contains("jinput") || library.name.contains("text2speech") || library.name.contains("objc")) {
|
||||
configName = Constants.CONFIG_MC_DEPENDENCIES_CLIENT;
|
||||
}
|
||||
project1.getDependencies().add(configName, library.getArtifactName());
|
||||
|
|
|
@ -118,7 +118,7 @@ public class DownloadTask extends DefaultTask {
|
|||
if (library.allowed() && library.getFile(extension) != null) {
|
||||
// By default, they are all available on all sides
|
||||
String configName = Constants.CONFIG_MC_DEPENDENCIES;
|
||||
if (library.name.contains("java3d") || library.name.contains("paulscode") || library.name.contains("lwjgl") || library.name.contains("twitch") || library.name.contains("jinput")) {
|
||||
if (library.name.contains("java3d") || library.name.contains("paulscode") || library.name.contains("lwjgl") || library.name.contains("twitch") || library.name.contains("jinput") || library.name.contains("text2speech") || library.name.contains("objc")) {
|
||||
configName = Constants.CONFIG_MC_DEPENDENCIES_CLIENT;
|
||||
}
|
||||
dependencyHandler.add(configName, library.getArtifactName());
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package net.fabricmc.loom.util;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import net.fabricmc.loom.LoomGradleExtension;
|
||||
|
||||
|
@ -108,7 +109,14 @@ public class Version {
|
|||
if (artifact == null) {
|
||||
artifact = new Artifact(name);
|
||||
}
|
||||
return artifact.getArtifact(natives == null ? artifact.getClassifier() : natives.get(OperatingSystem.getOS()).getAsString());
|
||||
if(natives != null){
|
||||
JsonElement jsonElement = natives.get(OperatingSystem.getOS());
|
||||
if(jsonElement != null){
|
||||
return artifact.getArtifact(jsonElement.getAsString());
|
||||
}
|
||||
}
|
||||
|
||||
return artifact.getArtifact(artifact.classifier);
|
||||
}
|
||||
|
||||
private class Artifact {
|
||||
|
|
Loading…
Reference in New Issue