generated from kotlin-hands-on/advent-of-code-kotlin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
48 lines (41 loc) · 1.03 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
plugins {
kotlin("jvm") version "1.9.22"
id("com.ncorti.ktfmt.gradle") version "0.15.1"
application
}
sourceSets {
main {
kotlin.srcDir("src/main/kotlin")
resources.srcDir("src/main/resources")
}
}
application {
mainClass.set("MainKt")
}
ktfmt {
kotlinLangStyle()
}
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("org.jetbrains.kotlinx:multik-core:0.2.3")
implementation("org.jetbrains.kotlinx:multik-default:0.2.3")
}
tasks {
wrapper {
gradleVersion = "8.7"
}
register("day01", JavaExec::class) {
group = "advent of code"
description = "Run Day01.kt solution"
mainClass.set("aoc2023.Day01Kt")
classpath = sourceSets["main"].runtimeClasspath
}
named<JavaExec>("run") {
project.findProperty("day")?.let { day ->
environment("AOC_DAY", day)
}
project.findProperty("year")?.let { year ->
environment("AOC_YEAR", year)
}
}
}