-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
115 lines (95 loc) · 2.8 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
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
with(Plugins.Jgitver) { id(id) version (version) }
with(Plugins.Shadow) { id(id) version (version) }
with(Plugins.Jmh) { id(id) version (version) apply false }
`maven-publish`
}
fun Project.configureKotlinConventions() {
apply(plugin = "kotlin")
apply(plugin = "maven-publish")
repositories {
mavenCentral()
maven(url = "https://jitpack.io")
}
dependencies {
implementation(platform(kotlin("bom")))
implementation(kotlin("stdlib-jdk8"))
implementation(Libs.KotlinLogging.kotlin_logging)
testImplementation(Libs.JUnit.jupiter_api)
testRuntimeOnly(Libs.JUnit.jupiter_engine)
testImplementation(Libs.JUnit.jupiter_params)
testImplementation(Libs.Kluent.kluent)
testImplementation(Libs.Log4j.log4j_core)
testImplementation(Libs.Log4j.log4j_slf4j2_impl)
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
showExceptions = true
showStandardStreams = true
events(
TestLogEvent.PASSED,
TestLogEvent.FAILED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_ERROR
)
exceptionFormat = TestExceptionFormat.FULL
}
}
java {
withSourcesJar()
withJavadocJar()
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
repositories {
maven(layout.buildDirectory.dir("repository"))
}
}
}
allprojects {
configureKotlinConventions()
}
subprojects {
group = "${rootProject.group}.${rootProject.name}"
version = rootProject.version
}
dependencies {
api(project(":core"))
api(project(":jni"))
api(project(":solvers-jni"))
api(project(":jna"))
api(project(":solvers-jna"))
implementation(project(":utils"))
implementation(project(":tests-utils"))
// // FIXME: temporary logging
// runtimeOnly(Libs.Log4j.log4j_core)
// runtimeOnly(Libs.Log4j.log4j_slf4j2_impl)
testImplementation(Libs.Klock.klock)
testImplementation(Libs.Okio.okio)
}
jgitver {
strategy("MAVEN")
}
tasks.shadowJar {
minimize()
}
tasks.wrapper {
gradleVersion = "8.6"
distributionType = Wrapper.DistributionType.ALL
}
defaultTasks("clean", "build")