@@ -6,14 +6,20 @@ buildscript {
66 }
77 dependencies {
88 classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
9+ classpath " org.jetbrains.dokka:dokka-gradle-plugin:0.9.17"
910 }
1011}
1112
1213plugins {
13- id ' java-library '
14+ id " java"
1415 id ' org.jetbrains.kotlin.jvm' version " 1.2.50"
16+ id " com.jfrog.bintray" version " 1.7"
1517}
1618
19+ apply plugin : " maven-publish"
20+ apply plugin : " java-library"
21+ apply plugin : ' org.jetbrains.dokka'
22+
1723compileKotlin {
1824 kotlinOptions. jvmTarget = " 1.8"
1925}
@@ -22,7 +28,7 @@ compileTestKotlin {
2228}
2329
2430group ' de.debuglevel.sparkutils'
25- version ' 0.0.1-SNAPSHOT '
31+ version ' 0.0.6 '
2632
2733sourceCompatibility = 1.8
2834
@@ -41,13 +47,56 @@ dependencies {
4147
4248 // Logging
4349 implementation ' io.github.microutils:kotlin-logging:1.4.9'
44- // compile 'org.slf4j:slf4j-api:1.7.5'
45- // compile 'org.slf4j:slf4j-simple:1.7.5'
4650
4751 // Spark (REST Server)
4852 compileOnly ' com.sparkjava:spark-kotlin:1.0.0-alpha'
4953}
5054
55+ dokka {
56+ outputFormat = ' html'
57+ outputDirectory = " $buildDir /javadoc"
58+ }
59+
60+ task sourcesJar (type : Jar ) {
61+ from sourceSets. main. allSource
62+ classifier ' sources'
63+ }
64+
65+ task dokkaJavadoc (type : org.jetbrains.dokka.gradle.DokkaTask ) {
66+ outputFormat = ' javadoc'
67+ outputDirectory = javadoc. destinationDir
68+ inputs. dir ' src/main/kotlin'
69+ }
70+
71+ task javadocJar (type : Jar , dependsOn : dokkaJavadoc) {
72+ classifier = ' javadoc'
73+ from javadoc. destinationDir
74+ }
75+
76+ publishing {
77+ publications {
78+ javaMaven(MavenPublication ) {
79+ from components. java
80+ artifact sourcesJar
81+ artifact javadocJar
82+ }
83+ }
84+ }
85+
86+ bintray {
87+ user = System . getenv(' BINTRAY_USER' )
88+ key = System . getenv(' BINTRAY_API_KEY' )
89+ publications = [' javaMaven' ]
90+ publish = true
91+ pkg {
92+ repo = ' maven'
93+ name = ' sparkutils'
94+ licenses = [' MIT' ]
95+ vcsUrl = ' https://github.com/debuglevel/sparkutils.git'
96+ }
97+ }
98+
99+
51100// test {
52101// useJUnitPlatform()
53102//
0 commit comments