gradle changes to build dependencies for production

This commit is contained in:
Joseph Garcia 2020-12-22 08:35:05 -06:00
parent 3674d63d0c
commit 071c567df6
7 changed files with 29 additions and 15 deletions

3
META-INF/MANIFEST.MF Normal file
View File

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: com.josyf.macrobuttons.MacroButtons

View File

@ -15,6 +15,7 @@ repositories {
name = "CottonMC"
url = "https://server.bbkr.space/artifactory/libs-release"
}
jcenter()
}
dependencies {
@ -28,17 +29,23 @@ dependencies {
// Serialization
compile group: 'com.alibaba', name: 'fastjson', version: '1.2.56'
compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1'
compile 'com.googlecode.json-simple:json-simple:1.1.1'
implementation 'com.cedarsoftware:json-io:4.10.1'
compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
// includes
include 'com.alibaba:fastjson:1.2.56'
include 'com.googlecode.json-simple:json-simple:1.1.1'
include 'com.cedarsoftware:json-io:4.10.1'
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
dependencies {
modImplementation "io.github.cottonmc:LibGui:3.2.2+1.16.3"
}
}
processResources {
inputs.property "version", project.version
@ -81,9 +88,5 @@ publishing {
}
}
// select the repositories you want to publish to
repositories {
// uncomment to publish to the local maven
// mavenLocal()
}
}

View File

@ -1,5 +1,6 @@
#Sun Dec 20 14:49:23 CST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

View File

@ -4,17 +4,18 @@ import com.alibaba.fastjson.JSON;
import com.cedarsoftware.util.io.JsonWriter;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.json.simple.parser.*;
import java.io.*;
import java.util.ArrayList;
public class ConfigFile {
static JSONParser parser = new JSONParser();
private static final JSONParser parser = new JSONParser();
private static FileWriter fileWriter;
// Read commands.json, convert it to an array, and append A JSON OBJECT
public static void appendToFile(JSONObject jsonObject) {
try {
@ -82,4 +83,6 @@ public class ConfigFile {
}
}

View File

@ -20,6 +20,10 @@ public class MacroButtons implements ModInitializer {
public static final String MOD_ID = "mgbuttons";
private static ArrayList<JSONObject> masterCommList;
public static void main(String[] args) {
}
@Override
public void onInitialize() {
assignGuiToKey();

View File

@ -71,7 +71,7 @@ public class ButtonGUI extends LightweightGuiDescription {
newJsonObject.put("name", name.getText());
newJsonObject.put("command", command.getText());
// append the buttons to masterList for future loading
// // append the buttons to masterList for future loading
ConfigFile.addObjectToCommList(newJsonObject);
ConfigFile.appendToFile(newJsonObject);

View File

@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"id": "mgbuttons",
"id": "macro-gui-buttons",
"version": "${version}",
"name": "Macro GUI Buttons",