Revert to use fabric mod.json format
parent
5446a322d4
commit
252b06bfc2
|
@ -280,9 +280,7 @@ public class AbstractPlugin implements Plugin<Project> {
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
try {
|
try {
|
||||||
JsonElement jsonElement = gson.fromJson(new FileReader(modJson), JsonElement.class);
|
JsonElement jsonElement = gson.fromJson(new FileReader(modJson), JsonElement.class);
|
||||||
JsonArray jsonArray = jsonElement.getAsJsonArray();
|
JsonObject jsonObject = jsonElement.getAsJsonObject();
|
||||||
for (int i = 0; i < jsonArray.size(); i++) {
|
|
||||||
JsonObject jsonObject = jsonArray.get(i).getAsJsonObject();
|
|
||||||
if ((extension.version == null || extension.version.isEmpty()) && jsonObject.has("version")) {
|
if ((extension.version == null || extension.version.isEmpty()) && jsonObject.has("version")) {
|
||||||
project.setVersion(jsonObject.get("version").getAsString());
|
project.setVersion(jsonObject.get("version").getAsString());
|
||||||
}
|
}
|
||||||
|
@ -292,7 +290,7 @@ public class AbstractPlugin implements Plugin<Project> {
|
||||||
if (jsonObject.has("description")) {
|
if (jsonObject.has("description")) {
|
||||||
project.setDescription(jsonObject.get("description").getAsString());
|
project.setDescription(jsonObject.get("description").getAsString());
|
||||||
}
|
}
|
||||||
}
|
//TODO load deps
|
||||||
|
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
//This wont happen as we have checked for it
|
//This wont happen as we have checked for it
|
||||||
|
|
Loading…
Reference in New Issue