aboutsummaryrefslogtreecommitdiff
path: root/forge
diff options
context:
space:
mode:
authornea <romangraef@gmail.com>2022-07-26 23:12:13 +0200
committernea <romangraef@gmail.com>2022-07-26 23:12:13 +0200
commit386ee78026801bf50d9cba24de541ed087f145d6 (patch)
tree3f85f2595141802d3d7f9828d440cfd50aee9a7c /forge
parentcc9c23914b8a928026a457b259e44bc4bb2fe655 (diff)
downloadfirmament-386ee78026801bf50d9cba24de541ed087f145d6.tar.gz
firmament-386ee78026801bf50d9cba24de541ed087f145d6.tar.bz2
firmament-386ee78026801bf50d9cba24de541ed087f145d6.zip
1.19 and no more forge
Diffstat (limited to 'forge')
-rw-r--r--forge/build.gradle.kts108
-rw-r--r--forge/gradle.properties1
-rw-r--r--forge/src/main/kotlin/net/examplemod/forge/ExampleExpectPlatformImpl.kt14
-rw-r--r--forge/src/main/kotlin/net/examplemod/forge/ExampleModForge.kt16
-rw-r--r--forge/src/main/resources/META-INF/mods.toml35
-rw-r--r--forge/src/main/resources/examplemod.mixins.json12
-rw-r--r--forge/src/main/resources/pack.mcmeta6
7 files changed, 0 insertions, 192 deletions
diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts
deleted file mode 100644
index 47a56db..0000000
--- a/forge/build.gradle.kts
+++ /dev/null
@@ -1,108 +0,0 @@
-plugins {
- id("com.github.johnrengelman.shadow") version "7.1.2"
-}
-
-architectury {
- platformSetupLoomIde()
- forge()
-}
-
-loom {
- accessWidenerPath.set(project(":common").loom.accessWidenerPath)
-
- forge {
- convertAccessWideners.set(true)
- extraAccessWideners.add(loom.accessWidenerPath.get().asFile.name)
- }
-}
-
-/**
- * @see: https://docs.gradle.org/current/userguide/migrating_from_groovy_to_kotlin_dsl.html
- * */
-val common: Configuration by configurations.creating
-val shadowCommon: Configuration by configurations.creating // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
-val developmentForge: Configuration = configurations.getByName("developmentForge")
-configurations {
- compileClasspath.get().extendsFrom(configurations["common"])
- runtimeClasspath.get().extendsFrom(configurations["common"])
- developmentForge.extendsFrom(configurations["common"])
-}
-
-dependencies {
- forge("net.minecraftforge:forge:${rootProject.property("forge_version")}")
- // Remove the next line if you don't want to depend on the API
- modApi("dev.architectury:architectury-forge:${rootProject.property("architectury_version")}")
- common(project(":common", configuration = "namedElements")) { isTransitive = false }
- shadowCommon(project(":common", configuration = "transformProductionForge")) { isTransitive = false }
- common(kotlin("stdlib-jdk8"))
- modRuntimeOnly("me.shedaniel:RoughlyEnoughItems-forge:${rootProject.property("rei_version")}")
-}
-
-val javaComponent = components["java"] as AdhocComponentWithVariants
-javaComponent.withVariantsFromConfiguration(configurations["sourcesElements"]) {
- skip()
-}
-
-tasks {
- processResources {
- inputs.property("version", project.version)
-
- filesMatching("META-INF/mods.toml") {
- expand("version" to project.version)
- }
- }
-
- shadowJar {
- exclude("fabric.mod.json")
- exclude("architectury.common.json")
-
- /**
- * magic!
- * groovy -> kotlin dsl
- * [project.configurations.shadowCommon] -> listOf(project.configurations["shadowCommon"])
- * */
- configurations = listOf(project.configurations["shadowCommon"])
- archiveClassifier.set("dev-shadow")
- }
-
- remapJar {
- /**
- * magic!
- * groovy -> kotlin dsl
- * shadowJar.archiveFile -> shadowJar.flatMap { it.archiveFile }
- * */
- inputFile.set(shadowJar.flatMap { it.archiveFile })
- dependsOn(shadowJar)
- /**
- * affect suffix of build jar name
- * if { archiveClassifier.set("forge") }
- * name will be examplemod-1.0.0-forge.jar
- */
- archiveClassifier.set("forge")
- }
-
- jar {
- archiveClassifier.set("dev")
- }
-
- sourcesJar {
- val commonSources = project(":common").tasks.getByName("sourcesJar", Jar::class)
- dependsOn(commonSources)
- from(commonSources.archiveFile.map { zipTree(it) })
- }
-
-
- publishing {
- publications {
- create<MavenPublication>("mavenForge") {
- artifactId = "${rootProject.property("archives_base_name")}-${project.name}"
- from(javaComponent)
- }
- }
-
- // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
- repositories {
- // Add repositories to publish to here.
- }
- }
-}
diff --git a/forge/gradle.properties b/forge/gradle.properties
deleted file mode 100644
index 32f842a..0000000
--- a/forge/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-loom.platform=forge \ No newline at end of file
diff --git a/forge/src/main/kotlin/net/examplemod/forge/ExampleExpectPlatformImpl.kt b/forge/src/main/kotlin/net/examplemod/forge/ExampleExpectPlatformImpl.kt
deleted file mode 100644
index 8617e69..0000000
--- a/forge/src/main/kotlin/net/examplemod/forge/ExampleExpectPlatformImpl.kt
+++ /dev/null
@@ -1,14 +0,0 @@
-package net.examplemod.forge
-
-import net.minecraftforge.fml.loading.FMLPaths
-import java.nio.file.Path
-import net.examplemod.ExampleExpectPlatform
-
-@Suppress("unused")
-object ExampleExpectPlatformImpl {
- /**
- * This is our actual method to [ExampleExpectPlatform.getConfigDirectory].
- */
- @JvmStatic
- fun getConfigDirectory(): Path = FMLPaths.CONFIGDIR.get()
-} \ No newline at end of file
diff --git a/forge/src/main/kotlin/net/examplemod/forge/ExampleModForge.kt b/forge/src/main/kotlin/net/examplemod/forge/ExampleModForge.kt
deleted file mode 100644
index 21fa303..0000000
--- a/forge/src/main/kotlin/net/examplemod/forge/ExampleModForge.kt
+++ /dev/null
@@ -1,16 +0,0 @@
-package net.examplemod.forge
-
-import dev.architectury.platform.forge.EventBuses
-import moe.nea.notenoughupdates.NotEnoughUpdates
-import moe.nea.notenoughupdates.NotEnoughUpdates.init
-import net.minecraftforge.fml.common.Mod
-import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext
-
-@Mod(NotEnoughUpdates.MOD_ID)
-class ExampleModForge {
- init {
- // Submit our event bus to let architectury register our content on the right time
- EventBuses.registerModEventBus(NotEnoughUpdates.MOD_ID, FMLJavaModLoadingContext.get().modEventBus)
- init()
- }
-}
diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml
deleted file mode 100644
index 4c3d869..0000000
--- a/forge/src/main/resources/META-INF/mods.toml
+++ /dev/null
@@ -1,35 +0,0 @@
-modLoader = "javafml"
-loaderVersion = "[40,)"
-#issueTrackerURL = "TODO"
-license = "LGPL-3.0"
-
-[[mods]]
-modId = "notenoughupdates"
-version = "${version}"
-displayName = "Not Enough Updates"
-authors = "nea89"
-description = '''
-Not Enough Updates - A mod for Hypixel Skyblock
-'''
-#logoFile = ""
-
-[[dependencies.notenoughupdates]]
-modId = "forge"
-mandatory = true
-versionRange = "[40,)"
-ordering = "NONE"
-side = "BOTH"
-
-[[dependencies.notenoughupdates]]
-modId = "minecraft"
-mandatory = true
-versionRange = "[1.18.2,)"
-ordering = "NONE"
-side = "BOTH"
-
-[[dependencies.notenoughupdates]]
-modId = "architectury"
-mandatory = true
-versionRange = "[4.2.50,)"
-ordering = "AFTER"
-side = "BOTH"
diff --git a/forge/src/main/resources/examplemod.mixins.json b/forge/src/main/resources/examplemod.mixins.json
deleted file mode 100644
index 50eba1c..0000000
--- a/forge/src/main/resources/examplemod.mixins.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "required": true,
- "package": "net.examplemod.mixin.forge",
- "compatibilityLevel": "JAVA_16",
- "client": [
- ],
- "mixins": [
- ],
- "injectors": {
- "defaultRequire": 1
- }
-} \ No newline at end of file
diff --git a/forge/src/main/resources/pack.mcmeta b/forge/src/main/resources/pack.mcmeta
deleted file mode 100644
index 9252d3d..0000000
--- a/forge/src/main/resources/pack.mcmeta
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "pack": {
- "description": "Example Mod",
- "pack_format": 8
- }
-}