mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 22:31:52 +00:00
architectury launches now
This commit is contained in:
@@ -1,11 +1,19 @@
|
|||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||||
import com.modrinth.minotaur.TaskModrinthUpload
|
import java.util.*
|
||||||
import net.fabricmc.loom.task.RemapJarTask
|
import net.fabricmc.loom.task.RemapJarTask
|
||||||
import java.util.Date
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("dev.architectury.loom") version Versions.Forge.architecuryLoom
|
id("dev.architectury.loom") version Versions.Forge.architecuryLoom
|
||||||
id("com.modrinth.minotaur") version Versions.Fabric.minotaur
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
shadedApi(project(":common:implementation:base"))
|
||||||
|
forgeRuntimeLibrary(project(":common:implementation:base"))
|
||||||
|
|
||||||
|
forge(group = "net.minecraftforge", name = "forge", version = Versions.Forge.forge)
|
||||||
|
|
||||||
|
minecraft("com.mojang:minecraft:${Versions.Forge.minecraft}")
|
||||||
|
mappings("net.fabricmc:yarn:${Versions.Forge.yarn}:v2")
|
||||||
}
|
}
|
||||||
|
|
||||||
loom {
|
loom {
|
||||||
@@ -17,72 +25,22 @@ loom {
|
|||||||
mixinConfigs.set(listOf("terra.mixins.json"))
|
mixinConfigs.set(listOf("terra.mixins.json"))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
tasks {
|
||||||
shadedApi(project(":common:implementation:base"))
|
jar {
|
||||||
|
manifest {
|
||||||
forge("net.minecraftforge:forge:${Versions.Forge.forge}")
|
attributes(
|
||||||
|
mapOf(
|
||||||
minecraft("com.mojang:minecraft:${Versions.Forge.minecraft}")
|
"Implementation-Title" to rootProject.name,
|
||||||
mappings("net.fabricmc:yarn:${Versions.Forge.yarn}:v2")
|
"Implementation-Version" to project.version,
|
||||||
}
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
remapJar {
|
||||||
|
inputFile.set(shadowJar.get().archiveFile)
|
||||||
|
archiveFileName.set("${rootProject.name.capitalize()}-${project.version}.jar")
|
||||||
|
|
||||||
addonDir(project.file("./run/config/Terra/addons"), tasks.named("runClient").get())
|
|
||||||
addonDir(project.file("./run/config/Terra/addons"), tasks.named("runServer").get())
|
|
||||||
|
|
||||||
tasks.withType<JavaCompile>().configureEach {
|
|
||||||
options.release.set(17)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.getByName<ShadowJar>("shadowJar") {
|
|
||||||
exclude("org/slf4j/**")
|
|
||||||
}
|
|
||||||
|
|
||||||
val remapped = tasks.register<RemapJarTask>("remapShadedJar") {
|
|
||||||
dependsOn("installAddons")
|
|
||||||
group = "loom"
|
|
||||||
val shadowJar = tasks.getByName<ShadowJar>("shadowJar")
|
|
||||||
dependsOn(shadowJar)
|
|
||||||
inputFile.set(shadowJar.archiveFile)
|
|
||||||
archiveFileName.set(shadowJar.archiveFileName.get().replace(Regex("-shaded\\.jar$"), "-shaded-mapped.jar"))
|
|
||||||
addNestedDependencies.set(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.named("assemble").configure {
|
|
||||||
dependsOn("remapShadedJar")
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType<Jar> {
|
|
||||||
finalizedBy(remapped)
|
|
||||||
manifest {
|
|
||||||
attributes(
|
|
||||||
mapOf(
|
|
||||||
"Specification-Title" to "terra",
|
|
||||||
"Specification-Vendor" to "Terra Contributors",
|
|
||||||
"Specification-Version" to "1",
|
|
||||||
"Implementation-Title" to project.name,
|
|
||||||
"Implementation-Version" to "@VERSION@",
|
|
||||||
"Implementation-Vendor" to "Terra Contributors",
|
|
||||||
"Implementation-Timestamp" to Date().toString()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<TaskModrinthUpload>("publishModrinth") {
|
|
||||||
dependsOn("remapShadedJar")
|
|
||||||
group = "loom"
|
|
||||||
token = System.getenv("MODRINTH_SECRET")
|
|
||||||
projectId = "FIlZB9L0"
|
|
||||||
versionNumber = "${project.version}-forge"
|
|
||||||
uploadFile = remapped.get().archiveFile.get().asFile
|
|
||||||
releaseType = "beta"
|
|
||||||
addGameVersion(Versions.Forge.minecraft)
|
|
||||||
addLoader("forge")
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 127 KiB |
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"generator.terra": "Terra"
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"description": "Terra Resources",
|
||||||
|
"pack_format": 9
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,50 +1,50 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"minVersion": "0.8",
|
"minVersion": "0.8",
|
||||||
"package": "com.dfsek.terra.fabric.mixin",
|
"package": "com.dfsek.terra.forge.mixin",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"com.dfsek.terra.forge.mixin.access.ChunkRegionAccessor",
|
"access.ChunkRegionAccessor",
|
||||||
"com.dfsek.terra.forge.mixin.access.MobSpawnerLogicAccessor",
|
"access.MobSpawnerLogicAccessor",
|
||||||
"com.dfsek.terra.forge.mixin.access.StateAccessor",
|
"access.StateAccessor",
|
||||||
"com.dfsek.terra.forge.mixin.access.StructureAccessorAccessor",
|
"access.StructureAccessorAccessor",
|
||||||
"com.dfsek.terra.forge.mixin.fix.BeeMoveGoalsUnsynchronizedRandomAccessFix",
|
"fix.BeeMoveGoalsUnsynchronizedRandomAccessFix",
|
||||||
"com.dfsek.terra.forge.mixin.fix.NetherFossilOptimization",
|
"fix.NetherFossilOptimization",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.compat.GenerationSettingsFloraFeaturesMixin",
|
"implementations.compat.GenerationSettingsFloraFeaturesMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.BiomeMixin",
|
"implementations.terra.BiomeMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.HandleImplementationMixin",
|
"implementations.terra.HandleImplementationMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.block.BlockMixin",
|
"implementations.terra.block.BlockMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.block.entity.BlockEntityMixin",
|
"implementations.terra.block.entity.BlockEntityMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.block.entity.LootableContainerBlockEntityMixin",
|
"implementations.terra.block.entity.LootableContainerBlockEntityMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.block.entity.MobSpawnerBlockEntityMixin",
|
"implementations.terra.block.entity.MobSpawnerBlockEntityMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.block.entity.SignBlockEntityMixin",
|
"implementations.terra.block.entity.SignBlockEntityMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.block.state.BlockStateMixin",
|
"implementations.terra.block.state.BlockStateMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.block.state.PropertyMixin",
|
"implementations.terra.block.state.PropertyMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.chunk.ChunkRegionMixin",
|
"implementations.terra.chunk.ChunkRegionMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.chunk.WorldChunkMixin",
|
"implementations.terra.chunk.WorldChunkMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.chunk.data.ProtoChunkMixin",
|
"implementations.terra.chunk.data.ProtoChunkMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.entity.EntityMixin",
|
"implementations.terra.entity.EntityMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.entity.EntityTypeMixin",
|
"implementations.terra.entity.EntityTypeMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.entity.PlayerEntityMixin",
|
"implementations.terra.entity.PlayerEntityMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.entity.ServerCommandSourceMixin",
|
"implementations.terra.entity.ServerCommandSourceMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.inventory.LockableContainerBlockEntityMixin",
|
"implementations.terra.inventory.LockableContainerBlockEntityMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.inventory.item.ItemMixin",
|
"implementations.terra.inventory.item.ItemMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.inventory.item.ItemStackMixin",
|
"implementations.terra.inventory.item.ItemStackMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.inventory.meta.EnchantmentMixin",
|
"implementations.terra.inventory.meta.EnchantmentMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.inventory.meta.ItemStackDamageableMixin",
|
"implementations.terra.inventory.meta.ItemStackDamageableMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.inventory.meta.ItemStackMetaMixin",
|
"implementations.terra.inventory.meta.ItemStackMetaMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.world.ChunkRegionMixin",
|
"implementations.terra.world.ChunkRegionMixin",
|
||||||
"com.dfsek.terra.forge.mixin.implementations.terra.world.ServerWorldMixin",
|
"implementations.terra.world.ServerWorldMixin",
|
||||||
"com.dfsek.terra.forge.mixin.lifecycle.DataPackContentsMixin",
|
"lifecycle.DataPackContentsMixin",
|
||||||
"com.dfsek.terra.forge.mixin.lifecycle.MinecraftServerMixin",
|
"lifecycle.MinecraftServerMixin",
|
||||||
"com.dfsek.terra.forge.mixin.lifecycle.NoiseConfigMixin",
|
"lifecycle.NoiseConfigMixin",
|
||||||
"com.dfsek.terra.forge.mixin.lifecycle.RegistryMixin"
|
"lifecycle.RegistryMixin"
|
||||||
],
|
],
|
||||||
"client": [
|
"client": [
|
||||||
"com.dfsek.terra.forge.mixin.lifecycle.client.MinecraftClientMixin"
|
"lifecycle.client.MinecraftClientMixin"
|
||||||
],
|
],
|
||||||
"server": [
|
"server": [
|
||||||
"com.dfsek.terra.forge.mixin.lifecycle.server.ServerMainMixin"
|
"lifecycle.server.ServerMainMixin"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
|
|||||||
+9
-5
@@ -24,11 +24,15 @@ include(":platforms:bukkit:common")
|
|||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
maven("https://maven.fabricmc.net") {
|
|
||||||
name = "Fabric"
|
|
||||||
}
|
|
||||||
maven ( "https://maven.architectury.dev/" )
|
|
||||||
maven ( "https://files.minecraftforge.net/maven/" )
|
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
|
maven("https://maven.fabricmc.net") {
|
||||||
|
name = "Fabric Maven"
|
||||||
|
}
|
||||||
|
maven ( "https://maven.architectury.dev/" ) {
|
||||||
|
name = "Architectury Maven"
|
||||||
|
}
|
||||||
|
maven ( "https://files.minecraftforge.net/maven/" ) {
|
||||||
|
name = "Forge Maven"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user