Replace appendln with appendLine in project
This commit is contained in:
@@ -169,29 +169,29 @@ fun KaptOptions.collectJavaSourceFiles(sourcesToReprocess: SourcesToReprocess =
|
||||
|
||||
fun KaptOptions.logString(additionalInfo: String = "") = buildString {
|
||||
val additionalInfoRendered = if (additionalInfo.isEmpty()) "" else " ($additionalInfo)"
|
||||
appendln("Kapt3 is enabled$additionalInfoRendered.")
|
||||
appendLine("Kapt3 is enabled$additionalInfoRendered.")
|
||||
|
||||
appendln("Annotation processing mode: ${mode.stringValue}")
|
||||
appendln("Memory leak detection mode: ${detectMemoryLeaks.stringValue}")
|
||||
KaptFlag.values().forEach { appendln(it.description + ": " + this@logString[it]) }
|
||||
appendLine("Annotation processing mode: ${mode.stringValue}")
|
||||
appendLine("Memory leak detection mode: ${detectMemoryLeaks.stringValue}")
|
||||
KaptFlag.values().forEach { appendLine(it.description + ": " + this@logString[it]) }
|
||||
|
||||
appendln("Project base dir: $projectBaseDir")
|
||||
appendln("Compile classpath: " + compileClasspath.joinToString())
|
||||
appendln("Java source roots: " + javaSourceRoots.joinToString())
|
||||
appendLine("Project base dir: $projectBaseDir")
|
||||
appendLine("Compile classpath: " + compileClasspath.joinToString())
|
||||
appendLine("Java source roots: " + javaSourceRoots.joinToString())
|
||||
|
||||
appendln("Sources output directory: $sourcesOutputDir")
|
||||
appendln("Class files output directory: $classesOutputDir")
|
||||
appendln("Stubs output directory: $stubsOutputDir")
|
||||
appendln("Incremental data output directory: $incrementalDataOutputDir")
|
||||
appendLine("Sources output directory: $sourcesOutputDir")
|
||||
appendLine("Class files output directory: $classesOutputDir")
|
||||
appendLine("Stubs output directory: $stubsOutputDir")
|
||||
appendLine("Incremental data output directory: $incrementalDataOutputDir")
|
||||
|
||||
appendln("Annotation processing classpath: " + processingClasspath.joinToString())
|
||||
appendln("Annotation processors: " + processors.joinToString())
|
||||
appendLine("Annotation processing classpath: " + processingClasspath.joinToString())
|
||||
appendLine("Annotation processors: " + processors.joinToString())
|
||||
|
||||
appendln("AP options: $processingOptions")
|
||||
appendln("Javac options: $javacOptions")
|
||||
appendLine("AP options: $processingOptions")
|
||||
appendLine("Javac options: $javacOptions")
|
||||
|
||||
appendln("[incremental apt] Changed files: $changedFiles")
|
||||
appendln("[incremental apt] Compiled sources directories: ${compiledSources.joinToString()}")
|
||||
appendln("[incremental apt] Cache directory for incremental compilation: $incrementalCache")
|
||||
appendln("[incremental apt] Changed classpath names: ${classpathChanges.joinToString()}")
|
||||
appendLine("[incremental apt] Changed files: $changedFiles")
|
||||
appendLine("[incremental apt] Compiled sources directories: ${compiledSources.joinToString()}")
|
||||
appendLine("[incremental apt] Cache directory for incremental compilation: $incrementalCache")
|
||||
appendLine("[incremental apt] Changed classpath names: ${classpathChanges.joinToString()}")
|
||||
}
|
||||
+3
-3
@@ -96,8 +96,8 @@ abstract class AbstractKaptToolIntegrationTest : TestCaseWithTmpdir() {
|
||||
if (!process.waitFor(2, TimeUnit.MINUTES)) err("Process is still alive")
|
||||
if (process.exitValue() != 0) {
|
||||
throw GotResult(buildString {
|
||||
append("Return code: ").appendln(process.exitValue()).appendln()
|
||||
appendln(outputFile.readText())
|
||||
append("Return code: ").appendLine(process.exitValue()).appendLine()
|
||||
appendLine(outputFile.readText())
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -117,6 +117,6 @@ private val Section.args get() = readArgumentsFromArgFile(preprocessPathSeparato
|
||||
private fun preprocessPathSeparators(text: String): String = buildString {
|
||||
for (line in text.lineSequence()) {
|
||||
val transformed = if (line.startsWith("-cp ")) line.replace(':', File.pathSeparatorChar) else line
|
||||
appendln(transformed)
|
||||
appendLine(transformed)
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ class Section(val name: String, val content: String) {
|
||||
saveCurrent()
|
||||
currentName = line.drop(2)
|
||||
} else {
|
||||
currentContent.appendln(line)
|
||||
currentContent.appendLine(line)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ class Section(val name: String, val content: String) {
|
||||
|
||||
fun List<Section>.render(): String = buildString {
|
||||
for (section in this@render) {
|
||||
append(SECTION_INDICATOR).appendln(section.name)
|
||||
appendln(section.content).appendln()
|
||||
append(SECTION_INDICATOR).appendLine(section.name)
|
||||
appendLine(section.content).appendLine()
|
||||
}
|
||||
}.trim()
|
||||
|
||||
|
||||
@@ -240,8 +240,8 @@ abstract class AbstractKapt3Extension(
|
||||
|
||||
for (leak in leaks) {
|
||||
logger.warn(buildString {
|
||||
appendln("Memory leak detected!")
|
||||
appendln("Location: '${leak.className}', static field '${leak.fieldName}'")
|
||||
appendLine("Memory leak detected!")
|
||||
appendLine("Location: '${leak.className}', static field '${leak.fieldName}'")
|
||||
append(leak.description)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user