mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-02-16 10:30:42 +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.modrinth.minotaur.TaskModrinthUpload
|
||||
import java.util.*
|
||||
import net.fabricmc.loom.task.RemapJarTask
|
||||
import java.util.Date
|
||||
|
||||
plugins {
|
||||
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 {
|
||||
@@ -17,72 +25,22 @@ loom {
|
||||
mixinConfigs.set(listOf("terra.mixins.json"))
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
shadedApi(project(":common:implementation:base"))
|
||||
|
||||
forge("net.minecraftforge:forge:${Versions.Forge.forge}")
|
||||
|
||||
minecraft("com.mojang:minecraft:${Versions.Forge.minecraft}")
|
||||
mappings("net.fabricmc:yarn:${Versions.Forge.yarn}:v2")
|
||||
}
|
||||
tasks {
|
||||
jar {
|
||||
manifest {
|
||||
attributes(
|
||||
mapOf(
|
||||
"Implementation-Title" to rootProject.name,
|
||||
"Implementation-Version" to project.version,
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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()
|
||||
)
|
||||
)
|
||||
remapJar {
|
||||
inputFile.set(shadowJar.get().archiveFile)
|
||||
archiveFileName.set("${rootProject.name.capitalize()}-${project.version}.jar")
|
||||
}
|
||||
}
|
||||
|
||||
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"
|
||||
}
|
||||
|
||||
6
platforms/forge/src/main/resources/pack.mcmeta
Normal file
6
platforms/forge/src/main/resources/pack.mcmeta
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"pack": {
|
||||
"description": "Terra Resources",
|
||||
"pack_format": 9
|
||||
}
|
||||
}
|
||||
@@ -1,50 +1,50 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "com.dfsek.terra.fabric.mixin",
|
||||
"package": "com.dfsek.terra.forge.mixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"mixins": [
|
||||
"com.dfsek.terra.forge.mixin.access.ChunkRegionAccessor",
|
||||
"com.dfsek.terra.forge.mixin.access.MobSpawnerLogicAccessor",
|
||||
"com.dfsek.terra.forge.mixin.access.StateAccessor",
|
||||
"com.dfsek.terra.forge.mixin.access.StructureAccessorAccessor",
|
||||
"com.dfsek.terra.forge.mixin.fix.BeeMoveGoalsUnsynchronizedRandomAccessFix",
|
||||
"com.dfsek.terra.forge.mixin.fix.NetherFossilOptimization",
|
||||
"com.dfsek.terra.forge.mixin.implementations.compat.GenerationSettingsFloraFeaturesMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.BiomeMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.HandleImplementationMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.block.BlockMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.block.entity.BlockEntityMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.block.entity.LootableContainerBlockEntityMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.block.entity.MobSpawnerBlockEntityMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.block.entity.SignBlockEntityMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.block.state.BlockStateMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.block.state.PropertyMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.chunk.ChunkRegionMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.chunk.WorldChunkMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.chunk.data.ProtoChunkMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.entity.EntityMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.entity.EntityTypeMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.entity.PlayerEntityMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.entity.ServerCommandSourceMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.inventory.LockableContainerBlockEntityMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.inventory.item.ItemMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.inventory.item.ItemStackMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.inventory.meta.EnchantmentMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.inventory.meta.ItemStackDamageableMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.inventory.meta.ItemStackMetaMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.world.ChunkRegionMixin",
|
||||
"com.dfsek.terra.forge.mixin.implementations.terra.world.ServerWorldMixin",
|
||||
"com.dfsek.terra.forge.mixin.lifecycle.DataPackContentsMixin",
|
||||
"com.dfsek.terra.forge.mixin.lifecycle.MinecraftServerMixin",
|
||||
"com.dfsek.terra.forge.mixin.lifecycle.NoiseConfigMixin",
|
||||
"com.dfsek.terra.forge.mixin.lifecycle.RegistryMixin"
|
||||
"access.ChunkRegionAccessor",
|
||||
"access.MobSpawnerLogicAccessor",
|
||||
"access.StateAccessor",
|
||||
"access.StructureAccessorAccessor",
|
||||
"fix.BeeMoveGoalsUnsynchronizedRandomAccessFix",
|
||||
"fix.NetherFossilOptimization",
|
||||
"implementations.compat.GenerationSettingsFloraFeaturesMixin",
|
||||
"implementations.terra.BiomeMixin",
|
||||
"implementations.terra.HandleImplementationMixin",
|
||||
"implementations.terra.block.BlockMixin",
|
||||
"implementations.terra.block.entity.BlockEntityMixin",
|
||||
"implementations.terra.block.entity.LootableContainerBlockEntityMixin",
|
||||
"implementations.terra.block.entity.MobSpawnerBlockEntityMixin",
|
||||
"implementations.terra.block.entity.SignBlockEntityMixin",
|
||||
"implementations.terra.block.state.BlockStateMixin",
|
||||
"implementations.terra.block.state.PropertyMixin",
|
||||
"implementations.terra.chunk.ChunkRegionMixin",
|
||||
"implementations.terra.chunk.WorldChunkMixin",
|
||||
"implementations.terra.chunk.data.ProtoChunkMixin",
|
||||
"implementations.terra.entity.EntityMixin",
|
||||
"implementations.terra.entity.EntityTypeMixin",
|
||||
"implementations.terra.entity.PlayerEntityMixin",
|
||||
"implementations.terra.entity.ServerCommandSourceMixin",
|
||||
"implementations.terra.inventory.LockableContainerBlockEntityMixin",
|
||||
"implementations.terra.inventory.item.ItemMixin",
|
||||
"implementations.terra.inventory.item.ItemStackMixin",
|
||||
"implementations.terra.inventory.meta.EnchantmentMixin",
|
||||
"implementations.terra.inventory.meta.ItemStackDamageableMixin",
|
||||
"implementations.terra.inventory.meta.ItemStackMetaMixin",
|
||||
"implementations.terra.world.ChunkRegionMixin",
|
||||
"implementations.terra.world.ServerWorldMixin",
|
||||
"lifecycle.DataPackContentsMixin",
|
||||
"lifecycle.MinecraftServerMixin",
|
||||
"lifecycle.NoiseConfigMixin",
|
||||
"lifecycle.RegistryMixin"
|
||||
],
|
||||
"client": [
|
||||
"com.dfsek.terra.forge.mixin.lifecycle.client.MinecraftClientMixin"
|
||||
"lifecycle.client.MinecraftClientMixin"
|
||||
],
|
||||
"server": [
|
||||
"com.dfsek.terra.forge.mixin.lifecycle.server.ServerMainMixin"
|
||||
"lifecycle.server.ServerMainMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
||||
@@ -24,11 +24,15 @@ include(":platforms:bukkit:common")
|
||||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
maven("https://maven.fabricmc.net") {
|
||||
name = "Fabric"
|
||||
}
|
||||
maven ( "https://maven.architectury.dev/" )
|
||||
maven ( "https://files.minecraftforge.net/maven/" )
|
||||
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