From a78e47a8d3d0dae7b68b0e414967e20ffb6e9a18 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Fri, 5 Feb 2021 15:52:05 +0100 Subject: Deduplicate resources in multimodule (#1711) --- .../kotlin/templates/JsonElementBasedTemplateProcessingStrategy.kt | 4 ---- .../src/test/kotlin/templates/AddToSearchCommandResolutionTest.kt | 6 ------ 2 files changed, 10 deletions(-) (limited to 'plugins/templating/src') diff --git a/plugins/templating/src/main/kotlin/templates/JsonElementBasedTemplateProcessingStrategy.kt b/plugins/templating/src/main/kotlin/templates/JsonElementBasedTemplateProcessingStrategy.kt index 5a97d216..dec37799 100644 --- a/plugins/templating/src/main/kotlin/templates/JsonElementBasedTemplateProcessingStrategy.kt +++ b/plugins/templating/src/main/kotlin/templates/JsonElementBasedTemplateProcessingStrategy.kt @@ -39,10 +39,6 @@ abstract class BaseJsonNavigationTemplateProcessingStrategy(val context: DokkaCo }) output.resolve(path).mkdirs() output.resolve("$path/$navigationFileNameWithoutExtension.json").writeText(content) - - fragments.keys.forEach { - output.resolve(it).resolve("$path/$navigationFileNameWithoutExtension.json").writeText(content) - } } } diff --git a/plugins/templating/src/test/kotlin/templates/AddToSearchCommandResolutionTest.kt b/plugins/templating/src/test/kotlin/templates/AddToSearchCommandResolutionTest.kt index 049cef96..bb4fb1c4 100644 --- a/plugins/templating/src/test/kotlin/templates/AddToSearchCommandResolutionTest.kt +++ b/plugins/templating/src/test/kotlin/templates/AddToSearchCommandResolutionTest.kt @@ -63,12 +63,6 @@ class AddToSearchCommandResolutionTest : TemplatingAbstractTest() { val output = parseJson>(outputDir.resolve("scripts/${fileName}").readText()) assertEquals(expected, output.sortedBy { it.location }) - - val outputFromModule1 = parseJson>(module1Navigation.readText()) - assertEquals(expected, outputFromModule1.sortedBy { it.location }) - - val outputFromModule2 = parseJson>(module2Navigation.readText()) - assertEquals(expected, outputFromModule2.sortedBy { it.location }) } } } -- cgit