gradle changes to build dependencies for production
This commit is contained in:
parent
3674d63d0c
commit
071c567df6
3
META-INF/MANIFEST.MF
Normal file
3
META-INF/MANIFEST.MF
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Main-Class: com.josyf.macrobuttons.MacroButtons
|
||||||
|
|
21
build.gradle
21
build.gradle
@ -15,6 +15,7 @@ repositories {
|
|||||||
name = "CottonMC"
|
name = "CottonMC"
|
||||||
url = "https://server.bbkr.space/artifactory/libs-release"
|
url = "https://server.bbkr.space/artifactory/libs-release"
|
||||||
}
|
}
|
||||||
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -28,16 +29,22 @@ dependencies {
|
|||||||
|
|
||||||
// Serialization
|
// Serialization
|
||||||
compile group: 'com.alibaba', name: 'fastjson', version: '1.2.56'
|
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'
|
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.
|
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
|
||||||
// You may need to force-disable transitiveness on them.
|
// You may need to force-disable transitiveness on them.
|
||||||
dependencies {
|
modImplementation "io.github.cottonmc:LibGui:3.2.2+1.16.3"
|
||||||
modImplementation "io.github.cottonmc:LibGui:3.2.2+1.16.3"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
@ -81,9 +88,5 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// select the repositories you want to publish to
|
|
||||||
repositories {
|
|
||||||
// uncomment to publish to the local maven
|
|
||||||
// mavenLocal()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
5
gradle/wrapper/gradle-wrapper.properties
vendored
5
gradle/wrapper/gradle-wrapper.properties
vendored
@ -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
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
@ -4,17 +4,18 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.cedarsoftware.util.io.JsonWriter;
|
import com.cedarsoftware.util.io.JsonWriter;
|
||||||
import org.json.simple.JSONArray;
|
import org.json.simple.JSONArray;
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
import org.json.simple.parser.JSONParser;
|
|
||||||
import org.json.simple.parser.ParseException;
|
import org.json.simple.parser.ParseException;
|
||||||
|
import org.json.simple.parser.*;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class ConfigFile {
|
public class ConfigFile {
|
||||||
|
|
||||||
static JSONParser parser = new JSONParser();
|
private static final JSONParser parser = new JSONParser();
|
||||||
private static FileWriter fileWriter;
|
private static FileWriter fileWriter;
|
||||||
|
|
||||||
|
|
||||||
// Read commands.json, convert it to an array, and append A JSON OBJECT
|
// Read commands.json, convert it to an array, and append A JSON OBJECT
|
||||||
public static void appendToFile(JSONObject jsonObject) {
|
public static void appendToFile(JSONObject jsonObject) {
|
||||||
try {
|
try {
|
||||||
@ -82,4 +83,6 @@ public class ConfigFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,10 @@ public class MacroButtons implements ModInitializer {
|
|||||||
public static final String MOD_ID = "mgbuttons";
|
public static final String MOD_ID = "mgbuttons";
|
||||||
private static ArrayList<JSONObject> masterCommList;
|
private static ArrayList<JSONObject> masterCommList;
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
assignGuiToKey();
|
assignGuiToKey();
|
||||||
|
@ -71,7 +71,7 @@ public class ButtonGUI extends LightweightGuiDescription {
|
|||||||
newJsonObject.put("name", name.getText());
|
newJsonObject.put("name", name.getText());
|
||||||
newJsonObject.put("command", command.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.addObjectToCommList(newJsonObject);
|
||||||
ConfigFile.appendToFile(newJsonObject);
|
ConfigFile.appendToFile(newJsonObject);
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": 1,
|
"schemaVersion": 1,
|
||||||
"id": "mgbuttons",
|
"id": "macro-gui-buttons",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
|
|
||||||
"name": "Macro GUI Buttons",
|
"name": "Macro GUI Buttons",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user