writeMergedKotlinSourceFiles

fun writeMergedKotlinSourceFiles(endpoints: List<HttpEndpointMetadata>, sourceFiles: List<KotlinSourceFileContribution>, generatedSourcesDirectory: File, endpointsSuffix: String = "Endpoints", logWarn: (String, Throwable?) -> Unit = { _, _ -> }): Set<File>(source)

Writes merged Kotlin endpoint contract files to generatedSourcesDirectory.

Contributions that target the same source package and file are merged into one rendered contract file.

Return

generated Kotlin source files written to disk.

Parameters

endpoints

endpoint metadata declared in the scanned sources.

sourceFiles

Kotlin contributions emitted by one or more generators.

generatedSourcesDirectory

root directory for generated Kotlin source files.

endpointsSuffix

suffix appended to source-level enclosing endpoints interfaces.

logWarn

warning logger used when multiple inputs collide on the same output path.