kotlin-result/build.gradle
2018-09-18 18:26:45 +01:00

63 lines
1.6 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.20.0'
id 'net.researchgate.release' version '2.7.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 {
implementation "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion"
testImplementation "org.jetbrains.kotlin:kotlin-test-common:$kotlinVersion"
testImplementation "org.jetbrains.kotlin:kotlin-test-annotations-common:$kotlinVersion"
}
dokka {
kotlinTasks { [] }
sourceDirs = sourceSets.main.kotlin.srcDirs
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
}
}
}