kotlin-result/build.gradle

71 lines
1.9 KiB
Groovy
Raw Normal View History

2017-10-21 02:51:30 +00:00
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion"
classpath "org.junit.platform:junit-platform-gradle-plugin:$junitPlatformVersion"
2017-10-21 21:33:59 +00:00
classpath "net.researchgate:gradle-release:$gradleReleaseVersion"
2017-10-21 02:51:30 +00:00
}
}
apply plugin: 'kotlin'
2017-10-21 23:59:16 +00:00
apply plugin: 'maven-publish'
2017-10-21 02:51:30 +00:00
apply plugin: 'org.jetbrains.dokka'
apply plugin: 'org.junit.platform.gradle.plugin'
2017-10-21 21:33:59 +00:00
apply plugin: 'net.researchgate.release'
description = 'A Result monad for modelling success or failure operations.'
2017-10-21 02:51:30 +00:00
repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlinVersion"
testCompile "com.natpryce:hamkrest:$hamkrestVersion"
testCompile "org.junit.jupiter:junit-jupiter-params:$junitVersion"
testCompile "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testRuntime "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
dokka {
2017-10-21 21:10:13 +00:00
outputFormat = 'javadoc'
2017-10-21 02:51:30 +00:00
outputDirectory = "$buildDir/docs"
}
2017-10-21 21:10:13 +00:00
task javadocJar(type: Jar, dependsOn: dokka) {
2017-10-21 19:03:51 +00:00
group = LifecycleBasePlugin.BUILD_GROUP
2017-10-21 21:10:13 +00:00
description = 'Assembles a jar archive containing the Javadoc API documentation.'
classifier = 'javadoc'
2017-10-21 19:03:51 +00:00
from dokka.outputDirectory
2017-10-21 02:51:30 +00:00
}
2017-10-21 19:03:51 +00:00
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
2017-10-21 02:51:30 +00:00
}
2017-10-21 21:37:45 +00:00
2017-10-21 23:59:16 +00:00
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact javadocJar
artifact sourcesJar
}
}
2017-10-21 21:37:45 +00:00
}