2022-11-04 22:31:56 +00:00
|
|
|
plugins {
|
|
|
|
`java-library`
|
|
|
|
`java-test-fixtures`
|
|
|
|
|
|
|
|
id("cc-tweaked.kotlin-convention")
|
|
|
|
id("cc-tweaked.java-convention")
|
|
|
|
id("cc-tweaked.publishing")
|
|
|
|
id("cc-tweaked")
|
|
|
|
}
|
|
|
|
|
|
|
|
val modVersion: String by extra
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
api(project(":core-api"))
|
|
|
|
implementation(libs.cobalt)
|
|
|
|
implementation(libs.fastutil)
|
|
|
|
implementation(libs.guava)
|
|
|
|
implementation(libs.netty.http)
|
|
|
|
implementation(libs.slf4j)
|
|
|
|
implementation(libs.asm)
|
|
|
|
|
|
|
|
testFixturesImplementation(libs.slf4j)
|
|
|
|
testFixturesApi(libs.bundles.test)
|
|
|
|
testFixturesApi(libs.bundles.kotlin)
|
|
|
|
|
|
|
|
testImplementation(libs.bundles.test)
|
|
|
|
testRuntimeOnly(libs.bundles.testRuntime)
|
2022-12-15 17:53:50 +00:00
|
|
|
testRuntimeOnly(libs.slf4j.simple)
|
2022-11-04 22:31:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.processResources {
|
|
|
|
inputs.property("gitHash", cct.gitHash)
|
|
|
|
|
|
|
|
filesMatching("data/computercraft/lua/rom/help/credits.txt") {
|
2022-12-13 20:31:59 +00:00
|
|
|
expand(mapOf("gitContributors" to cct.gitContributors.map { it.joinToString("\n") }.get()))
|
2022-11-04 22:31:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.test {
|
|
|
|
systemProperty("cct.test-files", buildDir.resolve("tmp/testFiles").absolutePath)
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.testFixturesJar {
|
|
|
|
manifest {
|
|
|
|
// Ensure the test fixtures jar loads as a mod. Thanks FML >_>.
|
|
|
|
attributes("FMLModType" to "GAMELIBRARY")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
val checkChangelog by tasks.registering(cc.tweaked.gradle.CheckChangelog::class) {
|
|
|
|
version.set(modVersion)
|
|
|
|
whatsNew.set(file("src/main/resources/data/computercraft/lua/rom/help/whatsnew.md"))
|
|
|
|
changelog.set(file("src/main/resources/data/computercraft/lua/rom/help/changelog.md"))
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.check { dependsOn(checkChangelog) }
|