This repository has been archived by the owner on Oct 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
138 lines (103 loc) · 3.89 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Kotlin application project to get you started.
*/
plugins {
// Apply the Kotlin JVM plugin to add support for Kotlin.
kotlin("jvm") version "1.4.10" // or kotlin("multiplatform") or any other kotlin plugin
kotlin("plugin.serialization") version "1.4.10"
// Apply the application plugin to add support for building a CLI application.
application
jacoco
maven
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
val kotlinVersion="1.4.10"
val ktorVersion = "1.3.2"
val koinVersion = "2.1.6"
val logbackVersion = "1.2.3"
val exposedVersion = "0.24.1"
val rabbitMqClientVersion = "5.9.0"
dependencies {
// Align versions of all Kotlin components
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
// Use the Kotlin JDK 8 standard library.
implementation(kotlin("stdlib", org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION)) // or "stdlib-jdk8"
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.0-RC2") // JVM dependency
// Use coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
//Asynchronous Web Framework
implementation("io.ktor:ktor-client-cio:${ktorVersion}")
implementation("io.ktor:ktor-client-json:${ktorVersion}")
implementation("io.ktor:ktor-client-jackson:${ktorVersion}")
implementation("io.ktor:ktor-server-netty:${ktorVersion}")
implementation("io.ktor:ktor-jackson:${ktorVersion}")
//implementation("io.ktor:ktor-gson:${ktorVersion}")
//ORM
implementation("org.jetbrains.exposed", "exposed-core", exposedVersion)
implementation("org.jetbrains.exposed", "exposed-dao", exposedVersion)
implementation("org.jetbrains.exposed", "exposed-jdbc", exposedVersion)
//CQS
implementation(group = "org.reflections",name ="reflections",version = "0.9.12" )
//DI
implementation("org.koin:koin-ktor:${koinVersion}")
implementation("org.koin:koin-core:${koinVersion}")
//Log
implementation("ch.qos.logback:logback-classic:${logbackVersion}")
// Use the Kotlin test library.
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.9")
// Use the Kotlin JUnit integration.
testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
//DI test
testImplementation("org.koin:koin-test:${koinVersion}")
//Asynchronous Web Framework
testImplementation("io.ktor:ktor-server-test-host:${ktorVersion}")
implementation(kotlin("script-runtime"))
//RabbitMQ
implementation("com.rabbitmq:amqp-client:${rabbitMqClientVersion}")
}
application {
// Define the main class for the application.
applicationDefaultJvmArgs = listOf("-ea")
mainClassName = "com.abaddon83.AppKt"
}
jacoco {
toolVersion = "0.8.5"
}
tasks.jacocoTestReport {
reports {
xml.isEnabled = true
csv.isEnabled = true
html.isEnabled = true
}
}
tasks.test {
finalizedBy(tasks.jacocoTestReport)
}
task("writeNewPom") {
doLast {
maven.pom {
withGroovyBuilder {
"project" {
setProperty("groupId", "com.abaddon83")
setProperty("inceptionYear", "2020")
setProperty("version","0.0.1")
"licenses" {
"license" {
setProperty("name", "The Apache Software License, Version 2.0")
setProperty("url", "http://www.apache.org/licenses/LICENSE-2.0.txt")
setProperty("distribution", "repo")
}
}
}
}
//}.writeTo("$buildDir/pom.xml")
}.writeTo("./pom.xml")
}
}