start setting up Factorio Gradle mod
This commit is contained in:
parent
f12a505d22
commit
42dab20210
2 changed files with 38 additions and 0 deletions
|
|
@ -0,0 +1,22 @@
|
|||
package dev.adamko.factorio_gradle
|
||||
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.create
|
||||
|
||||
abstract class FactorioModPlugin : Plugin<Project> {
|
||||
|
||||
override fun apply(target: Project) {
|
||||
target.createSettings()
|
||||
}
|
||||
|
||||
private fun Project.createSettings(): FactorioModSettings {
|
||||
return extensions.create<FactorioModSettings>(FACTORIO_GRADLE_EXTENSION_NAME).apply {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val FACTORIO_GRADLE_EXTENSION_NAME = "factorio"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package dev.adamko.factorio_gradle
|
||||
|
||||
import org.gradle.api.file.DirectoryProperty
|
||||
import org.gradle.api.file.RegularFileProperty
|
||||
import org.gradle.api.provider.Property
|
||||
|
||||
interface FactorioModSettings {
|
||||
|
||||
val factorioClientModsDirectory: DirectoryProperty
|
||||
|
||||
val steamExe: RegularFileProperty
|
||||
|
||||
val factorioGameSteamId: Property<String>
|
||||
|
||||
val factorioServerDataDirectory: DirectoryProperty
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue