-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
123 lines (103 loc) · 3.6 KB
/
build.gradle
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
buildscript {
ext {
kotlinVersion = "1.6.21"
}
}
plugins {
id "jacoco"
id "org.sonarqube" version "3.3"
id "org.jetbrains.kotlin.jvm" version "${kotlinVersion}"
id "org.jlleitschuh.gradle.ktlint" version "10.2.1"
}
group = 'com.wikia.tibia'
version = '2.0.0'
description = 'TibiaWikiBot'
repositories {
mavenLocal()
mavenCentral()
}
ext {
slf4jVersion = "2.0.0-alpha7"
jacksonVersion = "2.13.2"
junitVersion = "5.8.2"
jacocoVersion = "0.8.7"
retrofitVersion = "2.9.0"
coroutinesVersion = "1.6.1"
}
dependencies {
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
implementation "org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}" // unused, but otherwise gives warning
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${coroutinesVersion}"
// Logging
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
implementation "org.slf4j:slf4j-simple:${slf4jVersion}"
// Jackson
implementation "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-csv:${jacksonVersion}"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:${jacksonVersion}"
// Retrofit
implementation "com.squareup.retrofit2:retrofit:${retrofitVersion}"
implementation "com.squareup.retrofit2:converter-jackson:${retrofitVersion}"
// Various
implementation "com.github.ben-manes.caffeine:caffeine:3.0.6"
implementation "com.google.guava:guava:31.0.1-jre"
implementation "io.vavr:vavr:0.10.4"
// Testing
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
testImplementation "org.mockito:mockito-core:4.5.1"
testImplementation "org.hamcrest:hamcrest-core:2.2"
testImplementation "io.mockk:mockk:1.12.3"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:${coroutinesVersion}"
}
compileKotlin {
kotlinOptions {
jvmTarget = "17"
freeCompilerArgs += ["-opt-in=kotlin.RequiresOptIn"]
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "17"
freeCompilerArgs += ["-opt-in=kotlin.RequiresOptIn"]
}
}
sonarqube {
properties {
property "sonar.projectName", "TibiaWikiBot"
property "sonar.projectKey", "com.onlaika:TibiaWikiBot"
property "sonar.organization", "benjaminkomen-github"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.sources", "src/main/kotlin"
property "sonar.tests", "src/test/kotlin"
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.jacoco.reportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
}
}
project.tasks["jacocoTestReport"].dependsOn "test"
project.tasks["sonarqube"].dependsOn "jacocoTestReport"
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Test) {
useJUnitPlatform() // use jUnit 5
testLogging {
events "passed", "skipped", "failed"
}
}
jacoco {
toolVersion = "${jacocoVersion}"
}
plugins.withType(JacocoPlugin) {
tasks["test"].finalizedBy 'jacocoTestReport'
}
jacocoTestReport {
reports {
xml.enabled = true
xml.required = true
}
}