init
This commit is contained in:
commit
c5ee4e27e6
131 files changed
+9926
No files matched your search
@@ -0,0 +1,67 @@
|
||||
package buildsrc.common
|
||||
|
||||
val KEYS_RESOURCE_LOCATION = "src/main/resources"
|
||||
|
||||
tasks.register<Copy>("copyPublicKeyChat") {
|
||||
group = "openmmo"
|
||||
description = "Copy chat keys from \":keys\" to the current projects resources directory"
|
||||
from(project(":keys").tasks.getByName("generateChat").outputs.files) {
|
||||
include("*.public.pem")
|
||||
}
|
||||
into(project.layout.projectDirectory.dir(KEYS_RESOURCE_LOCATION))
|
||||
tasks.getByName("processResources").let { it.mustRunAfter("copyPublicKeyChat") }
|
||||
}
|
||||
|
||||
tasks.register<Copy>("copyPrivateKeyChat") {
|
||||
group = "openmmo"
|
||||
description = "Copy chat keys from \":keys\" to the current projects resources directory"
|
||||
from(project(":keys").tasks.getByName("generateChat").outputs.files) {
|
||||
include("*.public.pem")
|
||||
}
|
||||
into(project.layout.projectDirectory.dir(KEYS_RESOURCE_LOCATION))
|
||||
tasks.getByName("processResources").let { it.mustRunAfter("copyPrivateKeyChat") }
|
||||
}
|
||||
|
||||
tasks.register("copyKeysChat") {
|
||||
group = "openmmo"
|
||||
description = "Copies all chat keys from \":keys\" to the current projects resources directory"
|
||||
dependsOn("copyPublicKeyChat", "copyPrivateKeyChat")
|
||||
}
|
||||
|
||||
tasks.register<Copy>("copyPublicKeyGame") {
|
||||
group = "openmmo"
|
||||
description = "Copy game keys from \":keys\" to the current projects resources directory"
|
||||
from(project(":keys").tasks.getByName("generateGame").outputs.files) {
|
||||
include("*.public.pem")
|
||||
}
|
||||
into(project.layout.projectDirectory.dir(KEYS_RESOURCE_LOCATION))
|
||||
tasks.getByName("processResources").let { it.mustRunAfter("copyPublicKeyGame") }
|
||||
}
|
||||
|
||||
tasks.register<Copy>("copyPrivateKeyGame") {
|
||||
group = "openmmo"
|
||||
description = "Copy game keys from \":keys\" to the current projects resources directory"
|
||||
from(project(":keys").tasks.getByName("generateGame").outputs.files) {
|
||||
include("*.private.pem")
|
||||
}
|
||||
into(project.layout.projectDirectory.dir(KEYS_RESOURCE_LOCATION))
|
||||
tasks.getByName("processResources").let { it.mustRunAfter("copyPrivateKeyGame") }
|
||||
}
|
||||
|
||||
tasks.register("copyKeysGame") {
|
||||
group = "openmmo"
|
||||
description = "Copies all game keys from \":keys\" to the current projects resources directory"
|
||||
dependsOn("copyPublicKeyGame", "copyPrivateKeyGame")
|
||||
}
|
||||
|
||||
tasks.register("copyPublicKeys") {
|
||||
group = "openmmo"
|
||||
description = "Copies all public keys from \":keys\" to the current projects resources directory"
|
||||
dependsOn("copyPublicKeyChat", "copyPublicKeyGame")
|
||||
}
|
||||
|
||||
tasks.register("copyKeys") {
|
||||
group = "openmmo"
|
||||
description = "Copies all keys from \":keys\" to the current projects resources directory"
|
||||
dependsOn("copyKeysChat", "copyKeysGame")
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package buildsrc.convention
|
||||
|
||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
import org.gradle.kotlin.dsl.withType
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(24)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation(kotlin("test"))
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
|
||||
testLogging {
|
||||
events(
|
||||
TestLogEvent.FAILED,
|
||||
TestLogEvent.PASSED,
|
||||
TestLogEvent.SKIPPED
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package buildsrc.convention
|
||||
|
||||
import com.diffplug.spotless.LineEnding
|
||||
|
||||
plugins {
|
||||
id("com.diffplug.spotless")
|
||||
}
|
||||
|
||||
spotless {
|
||||
encoding("UTF-8")
|
||||
lineEndings = LineEnding.UNIX
|
||||
kotlinGradle {
|
||||
target("**/*.gradle.kts")
|
||||
ktfmt()
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
}
|
||||
kotlin {
|
||||
target("**/src/**/*.kt")
|
||||
ktfmt()
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
}
|
||||
format("misc") {
|
||||
target("**/*.md", "**/*.yml", "**/*.yaml", "**/*.properties")
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test> { dependsOn("spotlessCheck") }
|
||||
Reference in new issue
Block a user