summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore30
-rw-r--r--build.gradle44
-rw-r--r--gradle.properties1
-rw-r--r--gradle/wrapper/gradle-wrapper.properties5
-rw-r--r--settings.gradle25
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/tweaker/OneConfigTweaker.java35
6 files changed, 140 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6f25210
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,30 @@
+# eclipse
+eclipse
+bin
+*.launch
+.settings
+.metadata
+.classpath
+.project
+
+# idea
+out
+classes
+*.ipr
+*.iws
+*.iml
+.idea
+
+# gradle
+build
+.gradle
+
+#Netbeans
+.nb-gradle
+.nb-gradle-properties
+
+# other
+run
+.DS_Store
+Thumbs.db
+.idea \ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..91837cd
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,44 @@
+//file:noinspection GradlePackageUpdate
+plugins {
+ id 'com.github.johnrengelman.shadow' version '6.1.0'
+ id "net.minecraftforge.gradle.forge" version "ddb1eb0"
+ id "java"
+ id "maven-publish"
+}
+
+version = "1.0.0"
+group = "cc.polyfrost"
+archivesBaseName = rootProject.name.toLowerCase(Locale.ENGLISH)
+
+sourceCompatibility = targetCompatibility = 1.8
+compileJava.options.encoding = 'UTF-8'
+
+minecraft {
+ version = "1.8.9-11.15.1.2318-1.8.9"
+ runDir = "run"
+ mappings = "stable_22"
+ makeObfSourceJar = false
+}
+
+configurations {
+ include
+ implementation.extendsFrom(include)
+}
+
+repositories {
+ mavenCentral()
+ maven { url "https://repo.woverflow.cc/" }
+ maven { url "https://libraries.minecraft.net/" }
+}
+
+dependencies {
+ compileOnly ("com.google.code.gson:gson:2.2.3")
+ compileOnly ("org.apache.httpcomponents:httpclient:4.3.3")
+ include ('io.sentry:sentry:5.6.3')
+}
+
+shadowJar {
+ archiveClassifier.set('')
+ configurations = [project.configurations.include]
+ duplicatesStrategy DuplicatesStrategy.EXCLUDE
+} \ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..bf86fb7
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1 @@
+org.gradle.jvmargs=-Xmx2G \ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..9a4bdf0
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-all.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists \ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..36010f6
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,25 @@
+pluginManagement {
+ repositories {
+ mavenCentral()
+ gradlePluginPortal()
+
+ maven {
+ name = "Forge"
+ url = "https://maven.minecraftforge.net"
+ }
+
+ maven {
+ name = "Jitpack"
+ url = "https://jitpack.io/"
+ }
+ }
+ resolutionStrategy {
+ eachPlugin {
+ if (requested.id.id == "net.minecraftforge.gradle.forge") {
+ useModule("com.github.asbyth:ForgeGradle:${requested.version}")
+ }
+ }
+ }
+}
+
+rootProject.name = "OneConfig-Tweaker" \ No newline at end of file
diff --git a/src/main/java/cc/polyfrost/oneconfig/tweaker/OneConfigTweaker.java b/src/main/java/cc/polyfrost/oneconfig/tweaker/OneConfigTweaker.java
new file mode 100644
index 0000000..9b38070
--- /dev/null
+++ b/src/main/java/cc/polyfrost/oneconfig/tweaker/OneConfigTweaker.java
@@ -0,0 +1,35 @@
+package cc.polyfrost.oneconfig.tweaker;
+
+import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
+
+import java.util.Map;
+
+
+public class OneConfigTweaker implements IFMLLoadingPlugin {
+ private IFMLLoadingPlugin loader = null;
+
+ @Override
+ public String[] getASMTransformerClass() {
+ return loader.getASMTransformerClass();
+ }
+
+ @Override
+ public String getModContainerClass() {
+ return loader.getModContainerClass();
+ }
+
+ @Override
+ public String getSetupClass() {
+ return loader.getSetupClass();
+ }
+
+ @Override
+ public void injectData(Map<String, Object> data) {
+ loader.injectData(data);
+ }
+
+ @Override
+ public String getAccessTransformerClass() {
+ return loader.getAccessTransformerClass();
+ }
+}