Skip to content

Commit d99fd66

Browse files
authored
maven release (#5)
* finish gradle version bump * try adding maven-publish to make jitpack happy * fix maven publishing * bump project version
1 parent 1368949 commit d99fd66

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

build.gradle.kts

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

911
dependencies {
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

3234
group = "at.syntaxerror"
33-
version = "2.0.0"
35+
version = "2.0.2"
3436
description = "JSON5 for Kotlin"
3537

3638
java {
39+
withJavadocJar()
3740
withSourcesJar()
3841
}
3942

@@ -92,4 +95,19 @@ tasks.withType<JavaCompile> {
9295

9396
tasks.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
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)