gradle docker config tidy up
This commit is contained in:
parent
e56ecb7d36
commit
e0f689c538
7 changed files with 31 additions and 44 deletions
|
|
@ -12,9 +12,9 @@ dependencyResolutionManagement {
|
|||
repositories {
|
||||
myMavenLocal()
|
||||
mavenCentral()
|
||||
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
|
||||
mavenContent { snapshotsOnly() }
|
||||
}
|
||||
// maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
|
||||
// mavenContent { snapshotsOnly() }
|
||||
// }
|
||||
jitpack()
|
||||
gradlePluginPortal()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
rootProject.name = "buildSrc"
|
||||
|
||||
apply(from = "./repositories.settings.gradle.kts")
|
||||
|
||||
@Suppress("UnstableApiUsage") // Central declaration of repositories is an incubating feature
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ plugins {
|
|||
idea
|
||||
}
|
||||
|
||||
|
||||
group = rootProject.group
|
||||
version = rootProject.version
|
||||
|
||||
|
|
@ -18,19 +19,6 @@ tasks.withType<WriteProperties>().configureEach {
|
|||
}
|
||||
|
||||
|
||||
val hardReset by tasks.registering(Delete::class) {
|
||||
group = rootProject.name
|
||||
doFirst("hardResetConfirmation") {
|
||||
val answer = project.serviceOf<UserInputHandler>()
|
||||
.askYesNoQuestion("Are you sure you want to permanently delete Kafkatorio data?")
|
||||
|
||||
if (answer != true) {
|
||||
throw GradleException("Aborting hard reset")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tasks.withType<AbstractArchiveTask>().configureEach {
|
||||
exclude("**/.secret.*")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ val dockerUp by tasks.registering(Exec::class) {
|
|||
commandLine = parseSpaceSeparatedArgs(""" docker-compose up -d """)
|
||||
}
|
||||
|
||||
|
||||
val dockerDown by tasks.registering(Exec::class) {
|
||||
group = dockerComposeTaskGroup
|
||||
|
||||
|
|
@ -42,11 +43,13 @@ val dockerRemove by tasks.registering(Exec::class) {
|
|||
commandLine = parseSpaceSeparatedArgs(""" docker-compose rm --stop -v -f """)
|
||||
}
|
||||
|
||||
|
||||
afterEvaluate {
|
||||
tasks.named("processRun") { dependsOn(dockerUp, dockerEnv) }
|
||||
tasks.named("processKill") { dependsOn(dockerDown) }
|
||||
}
|
||||
|
||||
|
||||
val dockerEnv by tasks.registering(WriteProperties::class) {
|
||||
group = dockerComposeTaskGroup
|
||||
|
||||
|
|
@ -60,4 +63,5 @@ val dockerEnv by tasks.registering(WriteProperties::class) {
|
|||
)
|
||||
}
|
||||
|
||||
|
||||
tasks.assemble { dependsOn(dockerEnv) }
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
"engines": {
|
||||
"node": "~14.19.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
},
|
||||
"devDependencies": {},
|
||||
"dependencies": {
|
||||
"lua-types": "^2.11.0",
|
||||
"typescript-to-lua": "1.6.0",
|
||||
|
|
@ -18,10 +17,7 @@
|
|||
"typescript": "4.7.4"
|
||||
},
|
||||
"license": "UNLICENSED",
|
||||
"peerDependencies": {
|
||||
},
|
||||
"optionalDependencies": {
|
||||
},
|
||||
"bundledDependencies": [
|
||||
]
|
||||
"peerDependencies": {},
|
||||
"optionalDependencies": {},
|
||||
"bundledDependencies": []
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,17 +57,3 @@ idea {
|
|||
excludeDirs.add(file("src/factorio-server"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tasks.hardReset {
|
||||
|
||||
dependsOn(tasks.dockerRemove)
|
||||
|
||||
delete(
|
||||
factorioServerDataDir.dir("saves"),
|
||||
factorioServerDataDir.dir("temp"),
|
||||
factorioServerDataDir.file("factorio-current.log"),
|
||||
factorioServerDataDir.file("factorio-previous.log"),
|
||||
factorioServerDataDir.file(".lock"),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,16 +18,27 @@ typealias TileOnLoadFn = (done: DoneCallback, tile: HTMLElement) -> Unit
|
|||
|
||||
|
||||
sealed interface PolylinePathPoints {
|
||||
value class D1(val points: Array<LatLng>) : PolylinePathPoints
|
||||
value class D2(val points: Array<Array<LatLng>>) : PolylinePathPoints
|
||||
value class D3(val points: Array<Array<Array<LatLng>>>) : PolylinePathPoints
|
||||
value class D1(val points: List<LatLng>) : PolylinePathPoints {
|
||||
constructor(points: Array<LatLng>)
|
||||
: this(points.toList())
|
||||
}
|
||||
|
||||
value class D2(val points: List<List<LatLng>>) : PolylinePathPoints {
|
||||
constructor(points: Array<Array<LatLng>>)
|
||||
: this(points.map { x -> x.toList() }.toList())
|
||||
}
|
||||
|
||||
value class D3(val points: List<List<List<LatLng>>>) : PolylinePathPoints {
|
||||
constructor(points: Array<Array<Array<LatLng>>>)
|
||||
: this(points.map { x -> x.map { y -> y.toList() } }.toList())
|
||||
}
|
||||
}
|
||||
|
||||
inline fun Polyline<*>.getLatLngs2(): PolylinePathPoints? {
|
||||
return when (val points = this.getLatLngs()) {
|
||||
is Array<LatLng> -> PolylinePathPoints.D1(points as Array<LatLng>)
|
||||
is Array<Array<LatLng>> -> PolylinePathPoints.D2(points as Array<Array<LatLng>>)
|
||||
is Array<Array<Array<LatLng>>> -> PolylinePathPoints.D3(points as Array<Array<Array<LatLng>>>)
|
||||
is Array<LatLng> -> PolylinePathPoints.D1(points.unsafeCast<Array<LatLng>>())
|
||||
is Array<Array<LatLng>> -> PolylinePathPoints.D2(points.unsafeCast<Array<Array<LatLng>>>())
|
||||
is Array<Array<Array<LatLng>>> -> PolylinePathPoints.D3(points.unsafeCast<Array<Array<Array<LatLng>>>>())
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue