Configure dokka to produce javadoc

This commit is contained in:
Michael Bull 2017-10-21 20:03:51 +01:00
parent eb326ecebb
commit 1b29f4a58a
2 changed files with 22 additions and 8 deletions

View File

@ -60,6 +60,15 @@ Mappings from common Result libraries are available on the [wiki][wiki]:
- [Haskell][wiki-haskell] - [Haskell][wiki-haskell]
- [Rust][wiki-rust] - [Rust][wiki-rust]
## Contributing
Bug reports and pull requests are welcome on [GitHub][github].
## License
This project is available under the terms of the ISC license. See the
[`LICENSE`](LICENSE) file for the copyright information and licensing terms.
[Result]: https://github.com/michaelbull/kotlin-result/blob/master/src/main/kotlin/com/mikebull94/result/Result.kt#L8 [Result]: https://github.com/michaelbull/kotlin-result/blob/master/src/main/kotlin/com/mikebull94/result/Result.kt#L8
[Result.Ok]: https://github.com/michaelbull/kotlin-result/blob/master/src/main/kotlin/com/mikebull94/result/Result.kt#L13 [Result.Ok]: https://github.com/michaelbull/kotlin-result/blob/master/src/main/kotlin/com/mikebull94/result/Result.kt#L13
[Result.Error]: https://github.com/michaelbull/kotlin-result/blob/master/src/main/kotlin/com/mikebull94/result/Result.kt#L29a [Result.Error]: https://github.com/michaelbull/kotlin-result/blob/master/src/main/kotlin/com/mikebull94/result/Result.kt#L29a
@ -70,3 +79,4 @@ Mappings from common Result libraries are available on the [wiki][wiki]:
[wiki-elm]: https://github.com/michaelbull/kotlin-result/wiki/Elm [wiki-elm]: https://github.com/michaelbull/kotlin-result/wiki/Elm
[wiki-haskell]: https://github.com/michaelbull/kotlin-result/wiki/Haskell [wiki-haskell]: https://github.com/michaelbull/kotlin-result/wiki/Haskell
[wiki-rust]: https://github.com/michaelbull/kotlin-result/wiki/Rust [wiki-rust]: https://github.com/michaelbull/kotlin-result/wiki/Rust
[github]: https://github.com/michaelbull/kotlin-result

View File

@ -37,26 +37,30 @@ compileTestKotlin {
} }
dokka { dokka {
outputFormat = 'html' outputFormat = 'javadoc'
outputDirectory = "$buildDir/docs" outputDirectory = "$buildDir/docs"
} }
task sourcesJar(type: Jar) { task javadocJar(type: Jar, dependsOn: dokka) {
from sourceSets.main.allSource group = LifecycleBasePlugin.BUILD_GROUP
classifier = 'sources' description = 'Assembles a jar archive containing the Javadoc API documentation.'
classifier = 'javadoc'
from dokka.outputDirectory
} }
task kdocJar(type: Jar, dependsOn: dokka) { task sourcesJar(type: Jar) {
from dokka.outputDirectory group = LifecycleBasePlugin.BUILD_GROUP
classifier = 'docs' description = 'Assembles a jar archive containing the main classes with sources.'
classifier = 'sources'
from sourceSets.main.allSource
} }
publishing { publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
from components.java from components.java
artifact javadocJar
artifact sourcesJar artifact sourcesJar
artifact kdocJar
} }
} }
} }