kotlin-result/build.gradle

67 lines
1.7 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"
}
}
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'org.jetbrains.dokka'
apply plugin: 'org.junit.platform.gradle.plugin'
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 {
outputFormat = 'html'
2017-10-21 02:51:30 +00:00
outputDirectory = "$buildDir/docs"
}
task kdocJar(type: Jar, dependsOn: dokka) {
2017-10-21 19:03:51 +00:00
group = LifecycleBasePlugin.BUILD_GROUP
description = 'Assembles a jar archive containing the KDoc API documentation.'
classifier = 'kdoc'
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
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact kdocJar
2017-10-21 02:51:30 +00:00
artifact sourcesJar
}
}
}