-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
50 lines (37 loc) · 1.04 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.5.0"
}
group = "com.github.rusticflare"
repositories {
mavenCentral()
}
dependencies {
implementation("com.github.ajalt.clikt:clikt:3.1.0")
implementation("com.sksamuel.scrimage:scrimage-core:4.0.17")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0")
testImplementation(kotlin("test-junit"))
}
tasks.test {
useJUnit()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.time.ExperimentalTime"
}
tasks.withType<KotlinCompile>().configureEach {
}
tasks.withType<Jar> {
manifest {
attributes["Main-Class"] = "MainKt"
}
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
}
tasks.register<Copy>("packageForNpm") {
dependsOn(tasks.build)
from("$buildDir/libs/pixel-sorter.jar", "README.md", "package.json")
into("$buildDir/npm")
}
tasks.build {
finalizedBy("packageForNpm")
}