We want to move our Kotlin and Java samples from the samples Gradle subproject to dedicated source sets, named *Samples, in the types and the types-kotlinx-serialization subprojects.
The new Gradle plugin should provide the following tasks:
checkSampleSources that checks the content of sample sources
extractSamples that extracts samples for KDoc
checkSampleReferences that checks sample references from KDoc
backupMainSources that copies main sources into the build directory
inlineSamples that inlines KDoc samples
restoreMainSources that restores main sources from the build directory
Finally, all tasks provided by this plugin should support Kotlin and Java samples.
✅ Checklist
[x] 👷 Add org.kotools.samples Gradle plugin that should create source sets suffixed by Sample for Kotlin Multiplatform projects.
[x] 👷 Add checkSampleSources task in the new plugin.
[x] 👷 Add extractSamples task in the new plugin.
[x] 👷 Add checkSampleReferences task in the new plugin.
[x] 👷 Add backupMainSources task in the new plugin.
[x] 👷 Add restoreMainSources task in the new plugin.
[x] 👷 Add inlineSamples task in the new plugin.
[x] 👷 Configure integration of new plugin with Dokka and Kotlin.
[x] 👷 Use the new plugin in types-kotlinx-serialization Gradle subproject.
[x] 👷 Use the new plugin in types Gradle subproject.
[x] 🔥 Remove the org.kotools.types.samples Gradle plugin.
[x] 🔥 Remove the samples Gradle subproject, GitHub workflows and run configurations using it, then update the documentation referencing it in some way.
📝 Description
We want to move our Kotlin and Java samples from the
samples
Gradle subproject to dedicated source sets, named*Samples
, in thetypes
and thetypes-kotlinx-serialization
subprojects.The new Gradle plugin should provide the following tasks:
checkSampleSources
that checks the content of sample sourcesextractSamples
that extracts samples for KDoccheckSampleReferences
that checks sample references from KDocbackupMainSources
that copies main sources into the build directoryinlineSamples
that inlines KDoc samplesrestoreMainSources
that restores main sources from the build directoryFinally, all tasks provided by this plugin should support Kotlin and Java samples.
✅ Checklist
org.kotools.samples
Gradle plugin that should create source sets suffixed bySample
for Kotlin Multiplatform projects.checkSampleSources
task in the new plugin.extractSamples
task in the new plugin.checkSampleReferences
task in the new plugin.backupMainSources
task in the new plugin.restoreMainSources
task in the new plugin.inlineSamples
task in the new plugin.types-kotlinx-serialization
Gradle subproject.types
Gradle subproject.org.kotools.types.samples
Gradle plugin.samples
Gradle subproject, GitHub workflows and run configurations using it, then update the documentation referencing it in some way.