diff --git a/CHANGELOG.md b/CHANGELOG.md index 23d160277..997f45604 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [0.0.7] - April 16th, 2021 + +### Added + +- Include sources in publish 📚 + ## [0.0.6] - April 15th, 2021 ### Added diff --git a/gradle.properties b/gradle.properties index a5660286d..9679f5405 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # Kompendium -project.version=0.0.6 +project.version=0.0.7 # Kotlin kotlin.code.style=official # Gradle diff --git a/kompendium-core/build.gradle.kts b/kompendium-core/build.gradle.kts index 0d5e9dd02..e49bdccf8 100644 --- a/kompendium-core/build.gradle.kts +++ b/kompendium-core/build.gradle.kts @@ -13,6 +13,10 @@ dependencies { testImplementation("io.ktor:ktor-server-test-host:1.5.3") } +java { + withSourcesJar() +} + publishing { repositories { maven { @@ -27,6 +31,7 @@ publishing { publications { create("kompendium") { from(components["kotlin"]) + artifact(tasks.sourcesJar) } } } diff --git a/kompendium-core/src/main/kotlin/org/leafygreens/kompendium/Kompendium.kt b/kompendium-core/src/main/kotlin/org/leafygreens/kompendium/Kompendium.kt index f2cd0402a..f218ec6ea 100644 --- a/kompendium-core/src/main/kotlin/org/leafygreens/kompendium/Kompendium.kt +++ b/kompendium-core/src/main/kotlin/org/leafygreens/kompendium/Kompendium.kt @@ -85,7 +85,6 @@ object Kompendium { ): Route { if (TResp::class != Unit::class) openApiSpec.components.schemas.putPairIfAbsent(objectSchemaPair(TResp::class)) if (TReq::class != Unit::class) openApiSpec.components.schemas.putPairIfAbsent(objectSchemaPair(TReq::class)) -// openApiSpec.components.schemas.putPairIfAbsent(objectSchemaPair(TParam::class)) return block.invoke() } diff --git a/kompendium-core/src/test/kotlin/org/leafygreens/kompendium/util/TestModels.kt b/kompendium-core/src/test/kotlin/org/leafygreens/kompendium/util/TestModels.kt index 4049e90f5..537f88262 100644 --- a/kompendium-core/src/test/kotlin/org/leafygreens/kompendium/util/TestModels.kt +++ b/kompendium-core/src/test/kotlin/org/leafygreens/kompendium/util/TestModels.kt @@ -50,3 +50,9 @@ enum class SimpleEnum { ONE, TWO } + +sealed class TestSealedClass(open val a: String) + +data class SimpleTSC(val b: Int) : TestSealedClass("hey") +open class MediumTSC(override val a: String, val b: Int) : TestSealedClass(a) +data class WildTSC(val c: Boolean, val d: String, val e: Int) : MediumTSC(d, e)