-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
88 lines (69 loc) · 2.17 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.9.22"
`maven-publish`
signing
id("com.vanniktech.maven.publish").version("0.28.0")
}
group = "io.github.vivek656"
version = "0.0.1"
java {
sourceCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-reflect")
// https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-kotlin
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.16.1")
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation(platform("org.junit:junit-bom:5.10.0"))
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs += "-Xjsr305=strict"
jvmTarget = "17"
}
}
tasks.withType<GenerateModuleMetadata>().configureEach {
dependsOn(tasks.withType<AbstractCompile>())
dependsOn(tasks.named("kotlinSourcesJar"))
}
tasks.withType<Test> {
useJUnitPlatform()
}
mavenPublishing {
coordinates(
group as String,
name,
version as String
)
pom {
name = "kotlin-json-dsl"
description = "DSL to write Json in Kotlin with syntax as close to regular Json"
url = "https://github.com/vivek656/kotlin-json-dsl"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "vivek656"
name = "Vivek Singh Latwal"
email = "[email protected]"
}
}
scm {
url = "https://github.com/vivek656/kotlin-json-dsl"
connection = "scm:git:https://github.com/vivek656/kotlin-json-dsl.git"
developerConnection = "scm:git:[email protected]:vivek656/kotlin-json-dsl.git"
}
}
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL , true)
signAllPublications()
}