Skip to content

Commit

Permalink
Reformat with ktlint
Browse files Browse the repository at this point in the history
  • Loading branch information
Gekkio committed May 11, 2023
1 parent 1852bbd commit 2b13acf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ repositories {
}

val ghidraDir = System.getenv("GHIDRA_INSTALL_DIR")
?: (project.findProperty("ghidra.dir") as? String)
?: throw IllegalStateException("Can't find Ghidra installation")
?: (project.findProperty("ghidra.dir") as? String)
?: throw IllegalStateException("Can't find Ghidra installation")

val ghidraProps = Properties().apply { file("$ghidraDir/Ghidra/application.properties").inputStream().use { load(it) } }
val ghidraVersion = ghidraProps.getProperty("application.version")!!
Expand All @@ -49,7 +49,7 @@ tasks.withType<KotlinCompile> {

val ghidraJars =
fileTree("$ghidraDir/Ghidra/Framework") { include("**/*.jar") } +
fileTree("$ghidraDir/Ghidra/Features") { include("**/*.jar") }
fileTree("$ghidraDir/Ghidra/Features") { include("**/*.jar") }

val sleigh: Configuration by configurations.creating

Expand All @@ -72,11 +72,11 @@ val generateExtensionProps by tasks.registering() {
output.outputStream().use {
val props = Properties()
props += mapOf(
("name" to "GhidraBoy"),
("description" to "Support for Sharp SM83 / Game Boy"),
("author" to "Gekkio"),
("createdOn" to LocalDate.now().toString()),
("version" to ghidraVersion)
("name" to "GhidraBoy"),
("description" to "Support for Sharp SM83 / Game Boy"),
("author" to "Gekkio"),
("createdOn" to LocalDate.now().toString()),
("version" to ghidraVersion)
)
props.store(it, null)
}
Expand All @@ -88,10 +88,10 @@ val compileSleigh by tasks.registering(JavaExec::class) {
val slaFile = file("data/languages/sm83.sla")

inputs.files(fileTree("data/languages").include("*.slaspec", "*.sinc"))
.withPropertyName("sourceFiles")
.withPathSensitivity(PathSensitivity.RELATIVE)
.withPropertyName("sourceFiles")
.withPathSensitivity(PathSensitivity.RELATIVE)
outputs.files(slaFile)
.withPropertyName("outputFile")
.withPropertyName("outputFile")

classpath = sleigh
mainClass.set("ghidra.pcodeCPort.slgh_compile.SleighCompile")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class DecompilerTest : IntegrationTest() {
params = listOf(
parameter("dst", pointer(u8), register("HL")),
parameter("src", pointer(u8), register("DE")),
parameter("len", u16, register("BC")),
parameter("len", u16, register("BC"))
)
)
assertDecompiled(
Expand Down Expand Up @@ -142,7 +142,7 @@ class DecompilerTest : IntegrationTest() {
params = listOf(
parameter("dst", pointer(u8), register("HL")),
parameter("val", u8, register("A")),
parameter("len", u16, register("BC")),
parameter("len", u16, register("BC"))
)
)
assertDecompiled(
Expand Down Expand Up @@ -180,7 +180,7 @@ class DecompilerTest : IntegrationTest() {
""".trimIndent(),
name = "popcnt4_upper",
params = listOf(
parameter("value", u8, register("A")),
parameter("value", u8, register("A"))
),
returnParam = returnParameter(u8, register("A"))
)
Expand Down

0 comments on commit 2b13acf

Please sign in to comment.