diff --git a/build.gradle.kts b/build.gradle.kts index eef5c732..4497a9ea 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -131,13 +131,13 @@ subprojects { } dependencies { - implementation(kotlin("stdlib-jdk8")) + api(kotlin("stdlib-jdk8")) + api("org.jetbrains.kotlinx:kotlinx-coroutines-core") implementation(kotlin("reflect")) - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core") implementation("org.reflections:reflections") implementation("org.apache.commons:commons-text") arrayOf("core", "annotations", "databind").forEach { name -> - implementation(jacksonCore(name)) + api(jacksonCore(name)) } implementation(jackson("module", "kotlin")) implementation(jackson("datatype", "jsr310")) diff --git a/konf-all/build.gradle.kts b/konf-all/build.gradle.kts index 87a903b4..e1a3387a 100644 --- a/konf-all/build.gradle.kts +++ b/konf-all/build.gradle.kts @@ -26,7 +26,7 @@ dependencies { ":konf-xml", ":konf-yaml" )) { - implementation(project(name)) + api(project(name)) testImplementation(project(name).dependencyProject.sourceSets["test"].output) } diff --git a/konf-git/build.gradle.kts b/konf-git/build.gradle.kts index 78874f65..15358011 100644 --- a/konf-git/build.gradle.kts +++ b/konf-git/build.gradle.kts @@ -5,8 +5,8 @@ dependencyManagement { } dependencies { - implementation(project(":konf-core")) - implementation("org.eclipse.jgit:org.eclipse.jgit") + api(project(":konf-core")) + api("org.eclipse.jgit:org.eclipse.jgit") val test by project(":konf-core").dependencyProject.sourceSets testImplementation(test.output) diff --git a/konf-hocon/build.gradle.kts b/konf-hocon/build.gradle.kts index 1241f6c6..e75700cf 100644 --- a/konf-hocon/build.gradle.kts +++ b/konf-hocon/build.gradle.kts @@ -5,7 +5,7 @@ dependencyManagement { } dependencies { - implementation(project(":konf-core")) + api(project(":konf-core")) implementation("com.typesafe:config") val test by project(":konf-core").dependencyProject.sourceSets diff --git a/konf-hocon/src/main/kotlin/com/uchuhimo/konf/source/hocon/HoconSource.kt b/konf-hocon/src/main/kotlin/com/uchuhimo/konf/source/hocon/HoconSource.kt index eb990a1c..18ccac64 100644 --- a/konf-hocon/src/main/kotlin/com/uchuhimo/konf/source/hocon/HoconSource.kt +++ b/konf-hocon/src/main/kotlin/com/uchuhimo/konf/source/hocon/HoconSource.kt @@ -28,7 +28,7 @@ import com.uchuhimo.konf.source.Source import com.uchuhimo.konf.source.SourceInfo import com.uchuhimo.konf.source.ValueSourceNode -fun ConfigValue.toTree(): TreeNode { +private fun ConfigValue.toTree(): TreeNode { return when (valueType()!!) { ConfigValueType.NULL -> NullSourceNode ConfigValueType.BOOLEAN, ConfigValueType.NUMBER, ConfigValueType.STRING -> ValueSourceNode(unwrapped()) @@ -48,7 +48,7 @@ fun ConfigValue.toTree(): TreeNode { /** * Source from a HOCON value. */ -class HoconSource( +internal class HoconSource( val value: ConfigValue ) : Source { override val info: SourceInfo = SourceInfo("type" to "HOCON") diff --git a/konf-hocon/src/test/kotlin/com/uchuhimo/konf/source/hocon/HoconSourceSpec.kt b/konf-hocon/src/test/kotlin/com/uchuhimo/konf/source/hocon/HoconSourceSpec.kt index 35a0f3f1..d9cfddfd 100644 --- a/konf-hocon/src/test/kotlin/com/uchuhimo/konf/source/hocon/HoconSourceSpec.kt +++ b/konf-hocon/src/test/kotlin/com/uchuhimo/konf/source/hocon/HoconSourceSpec.kt @@ -29,7 +29,7 @@ import org.jetbrains.spek.api.dsl.it import org.jetbrains.spek.api.dsl.on import org.jetbrains.spek.subject.SubjectSpek -object HoconSourceSpec : SubjectSpek({ +internal object HoconSourceSpec : SubjectSpek({ subject { HoconProvider.string("key = 1") as HoconSource } given("a HOCON source") { diff --git a/konf-js/build.gradle.kts b/konf-js/build.gradle.kts index 3609c37a..a08b52b9 100644 --- a/konf-js/build.gradle.kts +++ b/konf-js/build.gradle.kts @@ -6,7 +6,7 @@ dependencyManagement { } dependencies { - implementation(project(":konf-core")) + api(project(":konf-core")) implementation("org.graalvm.sdk:graal-sdk") implementation("org.graalvm.js:js") diff --git a/konf-toml/build.gradle.kts b/konf-toml/build.gradle.kts index 3568b4c0..ee706bca 100644 --- a/konf-toml/build.gradle.kts +++ b/konf-toml/build.gradle.kts @@ -5,7 +5,7 @@ dependencyManagement { } dependencies { - implementation(project(":konf-core")) + api(project(":konf-core")) implementation("com.moandjiezana.toml:toml4j") val test by project(":konf-core").dependencyProject.sourceSets diff --git a/konf-xml/build.gradle.kts b/konf-xml/build.gradle.kts index 16f62214..15a073cd 100644 --- a/konf-xml/build.gradle.kts +++ b/konf-xml/build.gradle.kts @@ -6,7 +6,7 @@ dependencyManagement { } dependencies { - implementation(project(":konf-core")) + api(project(":konf-core")) implementation("org.dom4j:dom4j") implementation("jaxen:jaxen") diff --git a/konf-yaml/build.gradle.kts b/konf-yaml/build.gradle.kts index 5e9008bd..05092f30 100644 --- a/konf-yaml/build.gradle.kts +++ b/konf-yaml/build.gradle.kts @@ -5,7 +5,7 @@ dependencyManagement { } dependencies { - implementation(project(":konf-core")) + api(project(":konf-core")) implementation("org.yaml:snakeyaml") val test by project(":konf-core").dependencyProject.sourceSets diff --git a/konf-yaml/src/main/kotlin/com/uchuhimo/konf/source/yaml/YamlProvider.kt b/konf-yaml/src/main/kotlin/com/uchuhimo/konf/source/yaml/YamlProvider.kt index a29e891d..bfc58256 100644 --- a/konf-yaml/src/main/kotlin/com/uchuhimo/konf/source/yaml/YamlProvider.kt +++ b/konf-yaml/src/main/kotlin/com/uchuhimo/konf/source/yaml/YamlProvider.kt @@ -50,7 +50,7 @@ object YamlProvider : Provider { fun get() = this } -class YamlConstructor : SafeConstructor() { +private class YamlConstructor : SafeConstructor() { init { yamlConstructors[Tag.NULL] = object : AbstractConstruct() { override fun construct(node: Node): Any? {