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]
- [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.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
@ -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-haskell]: https://github.com/michaelbull/kotlin-result/wiki/Haskell
[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 {
outputFormat = 'html'
outputFormat = 'javadoc'
outputDirectory = "$buildDir/docs"
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
task javadocJar(type: Jar, dependsOn: dokka) {
group = LifecycleBasePlugin.BUILD_GROUP
description = 'Assembles a jar archive containing the Javadoc API documentation.'
classifier = 'javadoc'
from dokka.outputDirectory
}
task kdocJar(type: Jar, dependsOn: dokka) {
from dokka.outputDirectory
classifier = 'docs'
task sourcesJar(type: Jar) {
group = LifecycleBasePlugin.BUILD_GROUP
description = 'Assembles a jar archive containing the main classes with sources.'
classifier = 'sources'
from sourceSets.main.allSource
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact javadocJar
artifact sourcesJar
artifact kdocJar
}
}
}