MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / readConfigFile

Function readConfigFile

build.gradle.kts:352–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352fun readConfigFile(): List<String> {
353 val devCfg = providers.fileContents(project.layout.projectDirectory.file("devLaunchOptions.txt"))
354 val args = mutableListOf<String>()
355
356 if (!devCfg.asText.isPresent) {
357 logger.lifecycle("Launching using default options")
358 return args
359 }
360
361 logger.lifecycle("Launching using options from devLaunchOptions")
362
363 devCfg.asText.get().lineSequence().forEach { line ->
364 if (line.startsWith("#")) return@forEach
365 line.split(" ").filter { it.isNotBlank() }.forEach { arg -> args.add(arg) }
366 }
367 args.add("-Daij.dev") // Always show full version metadata when running via dev
368
369 logger.lifecycle("Launching with the following arguments: $args")
370 return args
371}
372
373// Use toolchain for packaging
374val packagingJdkToolchain = javaToolchains.launcherFor {

Callers 1

build.gradle.ktsFile · 0.85

Calls 6

forEachMethod · 0.80
startsWithMethod · 0.80
addMethod · 0.65
getMethod · 0.45
filterMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected