-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
86 lines (71 loc) · 1.87 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
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = "com.github.lipen"
plugins {
kotlin("jvm") version Versions.kotlin
`build-scan`
`maven-publish`
id("org.jlleitschuh.gradle.ktlint") version Versions.ktlint
id("com.github.ben-manes.versions") version Versions.gradle_versions
id("fr.brouillard.oss.gradle.jgitver") version Versions.jgitver
}
repositories {
jcenter()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
testImplementation(Libs.junit_jupiter_api)
testImplementation(Libs.junit_jupiter_params)
testImplementation(Libs.kluent)
testRuntimeOnly(Libs.junit_jupiter_engine)
}
val sourcesJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
artifacts {
add("archives", sourcesJar)
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
artifact(sourcesJar.get())
}
}
repositories {
maven(url = "$buildDir/repository")
}
}
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
ktlint {
ignoreFailures.set(true)
}
jgitver {
strategy("MAVEN")
}
tasks {
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
withType<Test> {
@Suppress("UnstableApiUsage")
useJUnitPlatform {
systemProperty("junit.jupiter.testinstance.lifecycle.default", "per_class")
}
testLogging.events(
TestLogEvent.PASSED,
TestLogEvent.FAILED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_ERROR
)
}
wrapper {
gradleVersion = "5.6.1"
distributionType = Wrapper.DistributionType.ALL
}
}
defaultTasks("clean", "build")