-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
87 lines (72 loc) · 1.67 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
plugins {
idea
kotlin("jvm") version "2.1.0"
}
group = "net.podkopaev"
version = "1.1"
java {
sourceCompatibility = JavaVersion.VERSION_18
targetCompatibility = JavaVersion.VERSION_18
}
kotlin {
jvmToolchain(18)
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "18"
}
}
defaultTasks("test")
repositories {
mavenCentral()
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib:2.1.0")
testImplementation("junit:junit:4.13.2")
}
sourceSets {
main {
kotlin {
srcDir("src/main")
}
}
test {
kotlin {
srcDir("src/test")
}
}
}
idea {
module {
name = "parserCombinators"
sourceDirs = sourceDirs + file("src/main")
testSourceDirs = testSourceDirs + file("src/test")
}
}
tasks {
register("setup") {
dependsOn("ideaModule")
}
jar {
archiveBaseName.set("parser-combinators")
archiveVersion.set(project.version.toString())
manifest {
attributes(
"Implementation-Title" to "Parser Combinators Library",
"Implementation-Version" to project.version,
"Implementation-Vendor" to "net.podkopaev",
"Built-By" to System.getProperty("user.name"),
"Built-JDK" to System.getProperty("java.version"),
"Created-By" to "Gradle ${gradle.gradleVersion}"
)
}
from(sourceSets.main.get().output)
from(sourceSets.main.get().allSource)
}
test {
useJUnit()
}
wrapper {
gradleVersion = "8.10"
}
}