-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
112 lines (95 loc) · 2.75 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "2.0.0"
id("org.jetbrains.dokka") version "1.9.20"
id("maven-publish")
idea
}
group = "io.taff"
version = "0.10.3${ if (isReleaseBuild()) "" else "-SNAPSHOT" }"
java.sourceCompatibility = JavaVersion.VERSION_20
repositories {
mavenCentral()
maven("https://jitpack.io")
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
dependencies {
runtimeOnly("org.jetbrains.kotlin:kotlin-reflect")
runtimeOnly("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
api("io.github.microutils:kotlin-logging-jvm:3.0.5")
api("com.natpryce:hamkrest:1.8.0.1")
api("com.google.guava:guava:33.2.1-jre")
api("com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1")
api("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1")
api("org.junit.jupiter:junit-jupiter")
implementation(enforcedPlatform("org.junit:junit-bom:5.10.2"))
api("org.spekframework.spek2:spek-dsl-jvm:2.0.19")
api("org.spekframework.spek2:spek-runner-junit5:2.0.19")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "20"
}
}
tasks {
register<Jar>("dokkaJar") {
from(dokkaHtml)
dependsOn(dokkaHtml)
archiveClassifier.set("javadoc")
}
register<Jar>("sourcesJar") {
from(sourceSets.main.get().allSource)
archiveClassifier.set("sources")
}
}
tasks.withType<Test> { useJUnitPlatform() }
tasks.withType<GenerateModuleMetadata> {
suppressedValidationErrors.add("enforced-platform")
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/tpasipanodya/spek-expekt")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
artifact(tasks["dokkaJar"])
artifact(tasks["sourcesJar"])
pom {
name.set("project.name")
description.set("${project.name} $version - A collection of extensions and expectation matchers for spek2")
url.set("https://github.com/tpasipanodya/spek-expekt")
licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
name.set("Tafadzwa Pasipanodya")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://github.com/tpasipanodya/spek-expekt.git")
developerConnection.set("scm:git:ssh://github.com/tpasipanodya/spek-expekt.git")
url.set("http://github.com/tpasipanodya/spek-expekt/tree/main")
}
}
}
}
}
fun isReleaseBuild() = System.getenv("IS_RELEASE_BUILD")?.toBoolean() == true