-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
82 lines (68 loc) · 2.23 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
import com.vanniktech.maven.publish.JavadocJar.*
import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.8.0"
id("org.jetbrains.dokka") version "latest.release" // dokka
id("com.vanniktech.maven.publish.base") version "latest.release"
`java-library`
idea
}
val groupId = "com.theonlytails"
val libVersion = "1.1.1"
group = groupId
version = libVersion
repositories {
mavenCentral()
}
dependencies {
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "18"
kotlinOptions.freeCompilerArgs = listOf("-Xcontext-receivers")
}
tasks.dokkaHtml.configure {
outputDirectory.set(projectDir.resolve("docs"))
}
// Publishing to maven central
plugins.withId("com.vanniktech.maven.publish.base") {
group = groupId
version = libVersion
@Suppress("UnstableApiUsage")
configure<MavenPublishBaseExtension> {
configure(KotlinJvm(Dokka("dokkaHtml"), true))
publishToMavenCentral(SonatypeHost.S01)
signAllPublications()
pom {
name.set("Ketex")
description.set("An idiomatic Kotlin DSL for creating regular expressions. ")
url.set("https://github.com/theonlytails/ketex")
inceptionYear.set("2022")
licenses {
license {
name.set("MIT License")
url.set("https://www.opensource.org/licenses/mit-license.php")
distribution.set("repo")
}
}
scm {
connection.set("scm:git:git://github.com/theonlytails/ketex.git")
developerConnection.set("scm:git:ssh://[email protected]/theonlytails/ketex.git")
url.set("https://github.com/theonlytails/ketex/")
}
developers {
developer {
name.set("TheOnlyTails")
id.set("theonlytails")
url.set("https://github.com/theonlytails/")
}
}
}
}
}