-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
55 lines (45 loc) · 1.34 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "2.1.0"
`maven-publish`
}
group = "io.github.persiancalendar"
version = "3.1.2"
repositories {
mavenCentral()
}
dependencies {
val junit5Version = "5.11.4"
testImplementation("org.junit.jupiter:junit-jupiter-api:$junit5Version")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junit5Version")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junit5Version")
testImplementation(kotlin("stdlib-jdk8"))
testImplementation(kotlin("test"))
implementation(kotlin("stdlib-jdk8"))
// Can be used to check the validity of our result but isn't used for now.
// testImplementation("com.google.zxing:core:3.5.1")
}
tasks.test {
useJUnitPlatform()
}
val javaVersion = JavaVersion.VERSION_17
configure<JavaPluginExtension> {
sourceCompatibility = javaVersion
}
val sourceJar by tasks.creating(Jar::class) {
dependsOn(tasks["classes"])
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
}
publishing {
publications {
register("mavenJava", MavenPublication::class) {
from(components["kotlin"])
artifact(sourceJar)
}
}
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = javaVersion.majorVersion
}