-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
147 lines (109 loc) · 4.02 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
138
139
140
141
142
143
144
145
146
147
@file:Suppress("PropertyName")
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.net.URL
import java.io.File
val kolor_version: String by project
val result_version: String by project
val pg_driver_version: String by project
val exposed_version: String by project
val hikari_version: String by project
val epgx_version: String by project
val coroutines_version: String by project
val junit_version: String by project
val logback_version: String by project
val jackson_version: String by project
plugins {
`maven-publish`
`java-library`
kotlin("jvm") version "1.4.0"
id("org.jetbrains.dokka") version "1.4.10-dev-52"
}
group = "dev.31416"
version = "0.2.2"
repositories {
mavenCentral()
mavenLocal()
jcenter()
maven("https://jitpack.io")
maven { url = uri("https://dl.bintray.com/kittinunf/maven") }
maven { url = uri("https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev") }
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("reflect"))
implementation("org.jetbrains.kotlinx", "kotlinx-coroutines-core", coroutines_version)
// Reflectr
api("com.github.blogify-dev", "reflectr", "ada67bb")
// Jackson
implementation("com.fasterxml.jackson.core", "jackson-core", jackson_version)
implementation("com.fasterxml.jackson.core", "jackson-databind", jackson_version)
implementation("com.fasterxml.jackson.core", "jackson-annotations", jackson_version)
implementation("com.fasterxml.jackson.module", "jackson-module-kotlin", jackson_version)
// Database stuff
implementation("org.postgresql", "postgresql", pg_driver_version)
implementation("com.zaxxer", "HikariCP", hikari_version)
api("org.jetbrains.exposed", "exposed-core", exposed_version)
api("org.jetbrains.exposed", "exposed-jdbc", exposed_version)
api("com.github.Benjozork", "exposed-postgres-extensions", epgx_version)
// Kolor
implementation("com.andreapivetta.kolor", "kolor", kolor_version)
// Result
api("com.github.kittinunf.result", "result", result_version)
api("com.github.kittinunf.result", "result-coroutines", result_version)
// Logback
implementation("ch.qos.logback", "logback-classic", logback_version)
// Testing
testImplementation("org.junit.jupiter", "junit-jupiter-api", junit_version)
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", junit_version)
testImplementation("org.jetbrains.kotlinx", "kotlinx-coroutines-test", coroutines_version)
}
val sourcesJar by tasks.creating(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.getByName("main").allSource)
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["kotlin"])
artifact(sourcesJar)
}
}
}
kotlin.sourceSets["main"].kotlin.srcDirs("src")
kotlin.sourceSets["test"].kotlin.srcDirs("test")
tasks {
withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.8"
}
withType<Test>().configureEach {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
dokkaHtml {
outputDirectory.set(File("docs/dokka"))
dokkaSourceSets {
configureEach {
includeNonPublic.set(false)
skipDeprecated.set(true)
skipEmptyPackages.set(true)
jdkVersion.set(8)
includes.from("docs/krate.md")
perPackageOption {
prefix.set("krate.annotations")
suppress.set(true)
}
perPackageOption {
prefix.set("krate.util")
suppress.set(true)
}
sourceLink {
localDirectory.set(projectDir)
remoteUrl.set(URL("https://github.com/blogify-dev/krate/blob/master/"))
remoteLineSuffix.set("#L")
}
}
}
}
}