-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
74 lines (63 loc) · 1.51 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
// Plugins section
plugins {
application
kotlin("jvm") version "1.4.0"
kotlin("plugin.serialization") version "1.4.0"
}
// Global variables
val appMainClass = "fx.soft.codecounter.Main"
val appVendor = "Ushiosan23"
// Repositories section
repositories {
mavenCentral()
jcenter()
}
// Configuration app
application {
group = "fx.soft.codecounter"
version = "0.0.1"
mainClassName = appMainClass
}
// Configure java source
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_11
}
// Configure tasks
tasks {
// Kotlin configuration
compileKotlin {
kotlinOptions.jvmTarget = "11"
}
// Kotlin test configuration
compileTestKotlin {
kotlinOptions.jvmTarget = "11"
}
// Jar configuration
jar {
// Manifest configuration
manifest {
attributes(
"Main-Class" to appMainClass,
"Specification-Title" to rootProject.name,
"Specification-Version" to archiveVersion.get(),
"Specification-Vendor" to appVendor
)
}
// Include files
from(configurations.compileClasspath.map { config ->
config.map { item ->
if (item.isDirectory) item else zipTree(item)
}
})
}
}
// Dependencies section
dependencies {
// Kotlin implementations
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-serialization:1.4.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.4.0")
// Test implementation
implementation("junit:junit:4.12")
}