mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-10 01:10:30 +00:00
6b83c63991
I didn't make a new years resolution to stop writing build tooling, but maybe I should have. This replaces our use of VanillaGradle with a new project, VanillaExtract. This offers a couple of useful features for multi-loader dev, including Parchment and Unpick support, both of which we now use in CC:T.
42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
|
//
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
/** 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")
|
|
id("cc.tweaked.vanilla-extract")
|
|
}
|
|
|
|
plugins.apply(CCTweakedPlugin::class.java)
|
|
|
|
val mcVersion: String by extra
|
|
|
|
val libs = project.extensions.getByType<VersionCatalogsExtension>().named("libs")
|
|
|
|
minecraft {
|
|
version(mcVersion)
|
|
|
|
mappings {
|
|
parchment(libs.findVersion("parchmentMc").get().toString(), libs.findVersion("parchment").get().toString())
|
|
}
|
|
|
|
unpick(libs.findLibrary("yarn").get())
|
|
}
|
|
|
|
dependencies {
|
|
// Depend on error prone annotations to silence a lot of compile warnings.
|
|
compileOnly(libs.findLibrary("errorProne.annotations").get())
|
|
}
|
|
|
|
MinecraftConfigurations.setupBasic(project)
|
|
|
|
extensions.configure(CCTweakedExtension::class.java) {
|
|
linters(minecraft = true, loader = null)
|
|
}
|