@@ -4,36 +4,39 @@ plugins {
44 val kotlinVersion = " 1.6.10"
55 kotlin(" jvm" ) version kotlinVersion
66 jacoco
7+ `java- library`
8+ `maven- publish`
79}
810
911dependencies {
1012 implementation(platform(" org.jetbrains.kotlin:kotlin-bom" ))
1113
1214 val kotlinxSerializationVersion = " 1.3.1"
13- implementation(project.dependencies.enforcedPlatform (" org.jetbrains.kotlinx:kotlinx-serialization-bom:$kotlinxSerializationVersion " ))
15+ implementation(platform (" org.jetbrains.kotlinx:kotlinx-serialization-bom:$kotlinxSerializationVersion " ))
1416 api(" org.jetbrains.kotlinx:kotlinx-serialization-core" )
1517 api(" org.jetbrains.kotlinx:kotlinx-serialization-json" )
1618
1719 val junitVersion = " 5.8.2"
18- testImplementation(enforcedPlatform (" org.junit:junit-bom:$junitVersion " ))
20+ testImplementation(platform (" org.junit:junit-bom:$junitVersion " ))
1921 testImplementation(" org.junit.jupiter:junit-jupiter" )
2022 testRuntimeOnly(" org.junit.platform:junit-platform-launcher" ) {
2123 because(" Only needed to run tests in a version of IntelliJ IDEA that bundles older versions" )
2224 }
2325
2426 val kotestVersion = " 5.0.3"
25- testImplementation(enforcedPlatform (" io.kotest:kotest-bom:$kotestVersion " ))
27+ testImplementation(platform (" io.kotest:kotest-bom:$kotestVersion " ))
2628 testImplementation(" io.kotest:kotest-runner-junit5:$kotestVersion " )
2729 testImplementation(" io.kotest:kotest-assertions-core:$kotestVersion " )
2830 testImplementation(" io.kotest:kotest-property:$kotestVersion " )
2931 testImplementation(" io.kotest:kotest-assertions-json:$kotestVersion " )
3032}
3133
3234group = " at.syntaxerror"
33- version = " 2.0.0 "
35+ version = " 2.0.2 "
3436description = " JSON5 for Kotlin"
3537
3638java {
39+ withJavadocJar()
3740 withSourcesJar()
3841}
3942
@@ -92,4 +95,19 @@ tasks.withType<JavaCompile> {
9295
9396tasks.wrapper {
9497 gradleVersion = " 7.3.2"
98+ distributionType = Wrapper .DistributionType .ALL
99+ }
100+
101+ tasks.javadoc {
102+ if (JavaVersion .current().isJava9Compatible) {
103+ (options as StandardJavadocDocletOptions ).addBooleanOption(" html5" , true )
104+ }
105+ }
106+
107+ publishing {
108+ publications {
109+ create<MavenPublication >(" mavenJava" ) {
110+ from(components[" java" ])
111+ }
112+ }
95113}
0 commit comments