style: clean up

This commit is contained in:
xtex 2023-06-29 20:42:06 +08:00
parent 2bd368ff4c
commit baf865e80b
Signed by: xtex
GPG Key ID: B918086ED8045B91
6 changed files with 16 additions and 37 deletions

View File

@ -17,15 +17,9 @@ subprojects {
val loom = project.extensions.getByName<LoomGradleExtensionAPI>("loom")
dependencies {
"minecraft"("com.mojang:minecraft:${project.property("minecraft_version")}")
// The following line declares the mojmap mappings, you may use other mappings as well
"mappings"(
loom.officialMojangMappings()
)
// The following line declares the yarn mappings you may select this one as well.
// "mappings"("net.fabricmc:yarn:1.18.2+build.3:v2")
"mappings"(loom.officialMojangMappings())
}
}
@ -35,18 +29,9 @@ allprojects {
apply(plugin = "architectury-plugin")
apply(plugin = "maven-publish")
base.archivesName.set(rootProject.property("archives_base_name").toString())
//base.archivesBaseName = rootProject.property("archives_base_name").toString()
version = rootProject.property("mod_version").toString()
group = rootProject.property("maven_group").toString()
repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
}
base.archivesName.set("quaedam")
version = "1.0.0"
group = "quaedam"
dependencies {
compileOnly("org.jetbrains.kotlin:kotlin-stdlib")
@ -56,6 +41,7 @@ allprojects {
options.encoding = "UTF-8"
options.release.set(17)
}
kotlin.target.compilations.all {
kotlinOptions.jvmTarget = "17"
}

View File

@ -3,12 +3,12 @@ package quaedam
import dev.architectury.registry.CreativeTabRegistry
import dev.architectury.registry.registries.DeferredRegister
import dev.architectury.registry.registries.RegistrySupplier
import quaedam.QuaedamExpectPlatform.getConfigDirectory
import net.minecraft.core.registries.Registries
import net.minecraft.network.chat.Component
import net.minecraft.world.item.CreativeModeTab
import net.minecraft.world.item.Item
import net.minecraft.world.item.ItemStack
import quaedam.QuaedamExpectPlatform.getConfigDirectory
object Quaedam {
const val MOD_ID = "quaedam"

View File

@ -50,12 +50,14 @@ tasks.processResources {
inputs.property("version", project.version)
filesMatching("META-INF/mods.toml") {
expand(mapOf(
expand(
mapOf(
"version" to project.version,
"minecraft_version" to rootProject.property("minecraft_version"),
"architectury_version" to rootProject.property("architectury_version"),
"kotlin_for_forge_version" to rootProject.property("kotlin_for_forge_version")
))
)
)
}
}

View File

@ -1,8 +1,8 @@
package quaedam.forge
import dev.architectury.platform.forge.EventBuses
import quaedam.Quaedam
import net.minecraftforge.fml.common.Mod
import quaedam.Quaedam
import thedarkcolour.kotlinforforge.forge.MOD_BUS
@Mod(Quaedam.MOD_ID)

View File

@ -1,21 +1,12 @@
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.jvmargs=-Xmx2048M
minecraft_version=1.20.1
archives_base_name=quaedam
mod_id=quaedam
mod_version=1.0.0
maven_group=quaedam
# https://www.curseforge.com/minecraft/mc-mods/architectury-api
architectury_version=9.0.8
# https://files.minecraftforge.net/net/minecraftforge/forge/
forge_version=1.20.1-47.0.35
# https://www.curseforge.com/minecraft/mc-mods/kotlin-for-forge/files
kotlin_for_forge_version=4.3.0
# https://fabricmc.net/develop/
fabric_loader_version=0.14.21