2023-03-15 21:52:13 +00:00
|
|
|
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2022-11-06 15:07:13 +00:00
|
|
|
/** Default configuration for non-modloader-specific Minecraft projects. */
|
|
|
|
|
|
|
|
import cc.tweaked.gradle.CCTweakedExtension
|
|
|
|
import cc.tweaked.gradle.CCTweakedPlugin
|
|
|
|
import cc.tweaked.gradle.MinecraftConfigurations
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
id("cc-tweaked.java-convention")
|
2024-01-29 20:59:16 +00:00
|
|
|
id("cc.tweaked.vanilla-extract")
|
2022-11-06 15:07:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
plugins.apply(CCTweakedPlugin::class.java)
|
|
|
|
|
|
|
|
val mcVersion: String by extra
|
|
|
|
|
2024-01-29 20:59:16 +00:00
|
|
|
val libs = project.extensions.getByType<VersionCatalogsExtension>().named("libs")
|
|
|
|
|
2022-11-06 15:07:13 +00:00
|
|
|
minecraft {
|
|
|
|
version(mcVersion)
|
2024-01-29 20:59:16 +00:00
|
|
|
|
|
|
|
mappings {
|
|
|
|
parchment(libs.findVersion("parchmentMc").get().toString(), libs.findVersion("parchment").get().toString())
|
|
|
|
}
|
|
|
|
|
|
|
|
unpick(libs.findLibrary("yarn").get())
|
2022-11-06 15:07:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
// Depend on error prone annotations to silence a lot of compile warnings.
|
2024-01-29 20:59:16 +00:00
|
|
|
compileOnly(libs.findLibrary("errorProne.annotations").get())
|
2022-11-06 15:07:13 +00:00
|
|
|
}
|
|
|
|
|
2024-01-29 20:59:16 +00:00
|
|
|
MinecraftConfigurations.setupBasic(project)
|
2022-11-10 00:03:09 +00:00
|
|
|
|
|
|
|
extensions.configure(CCTweakedExtension::class.java) {
|
|
|
|
linters(minecraft = true, loader = null)
|
|
|
|
}
|