2022-10-07 16:03:38 +02:00
|
|
|
package io.gitlab.jfronny.scripts
|
2022-10-06 19:30:52 +02:00
|
|
|
|
|
|
|
import org.gradle.api.Project
|
|
|
|
import org.gradle.api.provider.Property
|
|
|
|
import java.util.*
|
|
|
|
|
|
|
|
interface LomExtension {
|
2023-07-09 16:47:13 +02:00
|
|
|
val yarnBuild: Property<String>
|
2022-10-06 19:30:52 +02:00
|
|
|
|
|
|
|
fun yarn(yarnBuild: String) {
|
2023-07-09 16:47:13 +02:00
|
|
|
this.yarnBuild.set(Objects.requireNonNull(yarnBuild))
|
2022-10-06 19:30:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
fun mojmap() {
|
2023-07-09 16:47:13 +02:00
|
|
|
yarnBuild.set(null)
|
2022-10-06 19:30:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
val minecraftVersion: Property<String>
|
2024-03-12 11:30:54 +01:00
|
|
|
val loaderVersion: Property<String>
|
2022-10-06 19:30:52 +02:00
|
|
|
|
2023-07-09 16:47:13 +02:00
|
|
|
fun check(proj: Project) {
|
|
|
|
yarnBuild.finalizeValue()
|
|
|
|
minecraftVersion.finalizeValue()
|
2024-03-12 11:30:54 +01:00
|
|
|
loaderVersion.finalizeValue()
|
2023-07-09 16:47:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
fun copyFrom(ext: LomExtension) {
|
|
|
|
yarnBuild.set(ext.yarnBuild)
|
|
|
|
minecraftVersion.set(ext.minecraftVersion)
|
2024-03-12 11:30:54 +01:00
|
|
|
loaderVersion.set(ext.loaderVersion)
|
2022-10-06 19:30:52 +02:00
|
|
|
}
|
|
|
|
}
|