b812d938f9
This matches the default behaviour of the javadoc task. See: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.javadoc.Javadoc.html#org.gradle.api.tasks.javadoc.Javadoc:destinationDir
61 lines
1.5 KiB
Groovy
61 lines
1.5 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
|
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion"
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'com.github.ben-manes.versions' version '0.17.0'
|
|
id 'net.researchgate.release' version '2.6.0'
|
|
}
|
|
|
|
apply plugin: 'kotlin-platform-common'
|
|
apply plugin: 'maven-publish'
|
|
apply plugin: 'org.jetbrains.dokka'
|
|
|
|
description = 'A Result monad for modelling success or failure operations.'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion"
|
|
testCompile "org.jetbrains.kotlin:kotlin-test-annotations-common:$kotlinVersion"
|
|
testCompile "org.jetbrains.kotlin:kotlin-test-common:$kotlinVersion"
|
|
}
|
|
|
|
dokka {
|
|
outputFormat = 'javadoc'
|
|
outputDirectory = "${docsDir}/javadoc"
|
|
}
|
|
|
|
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 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) {
|
|
artifact javadocJar
|
|
artifact sourcesJar
|
|
}
|
|
}
|
|
}
|