aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--build.gradle65
-rw-r--r--gradle.properties1
-rw-r--r--gradle/wrapper/gradle-wrapper.properties2
-rwxr-xr-x[-rw-r--r--]gradlew0
-rw-r--r--settings.gradle.kts20
-rw-r--r--src/main/resources/mcmod.info2
7 files changed, 56 insertions, 37 deletions
diff --git a/.gitignore b/.gitignore
index 2c770e0..028d491 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,9 @@ out
*.iml
.idea
+# vscode
+.vscode
+
# gradle
build
.gradle
diff --git a/build.gradle b/build.gradle
index 189bde6..e4866a7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,25 +1,13 @@
-buildscript {
- repositories {
- mavenCentral()
- gradlePluginPortal()
- maven {
- name = "forge"
- url = "https://maven.minecraftforge.net/"
- }
- maven {
- name = "jitpack"
- url = "https://jitpack.io/"
- }
- }
- dependencies {
- classpath "com.github.asbyth:ForgeGradle:b13624b272"
- classpath "com.github.jengelman.gradle.plugins:shadow:6.1.0"
- }
+import dev.architectury.pack200.java.Pack200Adapter
+
+plugins {
+ id 'idea'
+ id 'java'
+ id 'gg.essential.loom' version '0.10.0.+'
+ id 'dev.architectury.architectury-pack200' version '0.1.3'
+ id 'com.github.johnrengelman.shadow' version '7.1.2'
}
-apply plugin: "net.minecraftforge.gradle.forge"
-apply plugin: "com.github.johnrengelman.shadow"
-
group= "me.djtheredstoner"
sourceCompatibility = JavaVersion.VERSION_1_8
@@ -32,11 +20,16 @@ sourceSets {
}
}
-minecraft {
- version = "1.8.9-11.15.1.2318-1.8.9"
- runDir = "run"
- mappings = "stable_22"
- clientJvmArgs += "-Dfml.coreMods.load=me.djtheredstoner.perspectivemod.forge.PerspectiveModTweaker"
+loom {
+ launchConfigs {
+ client {
+ property("fml.coreMods.load", "me.djtheredstoner.perspectivemod.forge.PerspectiveModTweaker")
+ arg("--tweakClass", "gg.essential.loader.stage0.EssentialSetupTweaker")
+ }
+ }
+ forge {
+ pack200Provider = new Pack200Adapter()
+ }
}
configurations {
@@ -52,9 +45,14 @@ repositories {
}
dependencies {
- embed "gg.essential:loader-launchwrapper:1.1.0"
+ minecraft 'com.mojang:minecraft:1.8.9'
+ mappings 'de.oceanlabs.mcp:mcp_stable:22-1.8.9'
+ forge 'net.minecraftforge:forge:1.8.9-11.15.1.2318-1.8.9'
+
+
+ embed "gg.essential:loader-launchwrapper:1.1.3"
- implementation "gg.essential:Essential:1193-10809-SNAPSHOT"
+ implementation "gg.essential:essential-1.8.9-forge:4804+g97db1f45b"
}
jar {
@@ -77,26 +75,23 @@ shadowJar {
)
}
-reobfJar.dependsOn tasks.shadowJar
-
-reobf {
- shadowJar {
- mappingType = 'SEARGE'
- }
+remapJar {
+ from shadowJar
+ input = shadowJar.archiveFile
}
processResources
{
+ duplicatesStrategy = DuplicatesStrategy.EXCLUDE
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
- inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
- expand 'version':project.version, 'mcversion':project.minecraft.version
+ expand 'version':project.version
}
// copy everything else, thats not the mcmod.info
diff --git a/gradle.properties b/gradle.properties
index ddd79e4..9b7869d 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,5 @@
org.gradle.jvmargs=-Xmx2G
+loom.platform=forge
# These are in here and not in build.gradle so that github actions can read them
modid = djperspectivemod
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 8cf6eb5..8049c68 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index cccdd3d..cccdd3d 100644..100755
--- a/gradlew
+++ b/gradlew
diff --git a/settings.gradle.kts b/settings.gradle.kts
new file mode 100644
index 0000000..ae13f0f
--- /dev/null
+++ b/settings.gradle.kts
@@ -0,0 +1,20 @@
+pluginManagement {
+ repositories {
+ mavenCentral()
+ gradlePluginPortal()
+ maven("https://oss.sonatype.org/content/repositories/snapshots")
+ maven("https://maven.architectury.dev/")
+ maven("https://maven.fabricmc.net")
+ maven("https://maven.minecraftforge.net/")
+ maven("https://repo.spongepowered.org/maven/")
+ maven("https://repo.sk1er.club/repository/maven-releases/")
+ }
+ resolutionStrategy {
+ eachPlugin {
+ when (requested.id.id) {
+ "gg.essential.loom" -> useModule("gg.essential:architectury-loom:${requested.version}")
+ }
+ }
+ }
+}
+
diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info
index 5827825..f9d8b7f 100644
--- a/src/main/resources/mcmod.info
+++ b/src/main/resources/mcmod.info
@@ -4,7 +4,7 @@
"name": "Perspective Mod v4",
"description": "",
"version": "${version}",
- "mcversion": "${mcversion}",
+ "mcversion": "1.8.9",
"url": "",
"updateUrl": "",
"authorList": ["DJtheRedstoner"],