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")
|
|
|
|
id("org.spongepowered.gradle.vanilla")
|
|
|
|
}
|
|
|
|
|
|
|
|
plugins.apply(CCTweakedPlugin::class.java)
|
|
|
|
|
|
|
|
val mcVersion: String by extra
|
|
|
|
|
|
|
|
minecraft {
|
|
|
|
version(mcVersion)
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
val libs = project.extensions.getByType<VersionCatalogsExtension>().named("libs")
|
|
|
|
|
|
|
|
// Depend on error prone annotations to silence a lot of compile warnings.
|
|
|
|
compileOnlyApi(libs.findLibrary("errorProne.annotations").get())
|
|
|
|
}
|
|
|
|
|
|
|
|
MinecraftConfigurations.setup(project)
|
2022-11-10 00:03:09 +00:00
|
|
|
|
|
|
|
extensions.configure(CCTweakedExtension::class.java) {
|
|
|
|
linters(minecraft = true, loader = null)
|
|
|
|
}
|