tidy up Gradle config, standardise a group for Factorio Mod tasks
This commit is contained in:
parent
f2ae951b1d
commit
dacb6f62c4
13 changed files with 83 additions and 174 deletions
|
|
@ -1,4 +1,4 @@
|
|||
package dev.adamko.kafkatorio.factoriomod
|
||||
package dev.adamko.kafkatorio.factoriomod.portal
|
||||
|
||||
import io.ktor.client.HttpClient
|
||||
import io.ktor.client.engine.cio.CIO
|
||||
|
|
@ -98,7 +98,7 @@ class FactorioModPortalPublishClient(
|
|||
require(response.status.isSuccess()) { "init upload request failed" }
|
||||
|
||||
return when (initUploadResponse) {
|
||||
is Failure -> error(initUploadResponse)
|
||||
is Failure -> error(initUploadResponse)
|
||||
is InitUploadResponse.Success -> initUploadResponse
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package dev.adamko.kafkatorio.factoriomod
|
||||
package dev.adamko.kafkatorio.factoriomod.portal
|
||||
|
||||
import dev.adamko.kafkatorio.factoriomod.FactorioMod
|
||||
import io.ktor.http.URLBuilder
|
||||
import io.ktor.http.takeFrom
|
||||
import javax.inject.Inject
|
||||
|
|
@ -59,7 +60,7 @@ abstract class FactorioModPublishTask @Inject constructor(
|
|||
|
||||
|
||||
init {
|
||||
group = "factorio"
|
||||
group = FactorioMod.TASK_GROUP
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package dev.adamko.kafkatorio.factoriomod
|
||||
package dev.adamko.kafkatorio.factoriomod.portal
|
||||
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package dev.adamko.kafkatorio.factoriomod
|
||||
|
||||
object FactorioMod {
|
||||
|
||||
const val TASK_GROUP = "factorioMod"
|
||||
|
||||
/** Lifecycle task for publishing the mod locally */
|
||||
const val PUBLISH_MOD_LOCAL_TASK_NAME = "publishModLocal"
|
||||
|
||||
const val PUBLISH_MOD_TASK_NAME = "publishMod"
|
||||
|
||||
}
|
||||
|
|
@ -12,16 +12,8 @@ val projectJvmTarget = "11"
|
|||
|
||||
|
||||
dependencies {
|
||||
|
||||
// implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
|
||||
|
||||
// testImplementation(platform("org.junit:junit-bom:${Versions.junit}"))
|
||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||
// testRuntimeOnly("org.junit.platform:junit-platform-launcher") {
|
||||
// because("Only needed to run tests in a version of IntelliJ IDEA that bundles older versions")
|
||||
// }
|
||||
|
||||
// testImplementation(platform("io.kotest:kotest-bom:${Versions.kotest}"))
|
||||
testImplementation("io.kotest:kotest-runner-junit5")
|
||||
testImplementation("io.kotest:kotest-assertions-core")
|
||||
testImplementation("io.kotest:kotest-property")
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import org.gradle.api.tasks.OutputDirectory
|
|||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
|
||||
abstract class GenerateTypescriptTask @Inject constructor(
|
||||
abstract class GenerateTypeScriptTask @Inject constructor(
|
||||
private val fileOps: FileSystemOperations,
|
||||
) : JavaExec() {
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue