-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle.kts
118 lines (102 loc) · 3.19 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = "it.unibo.jakta"
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.gitSemVer)
alias(libs.plugins.publishOnCentral)
alias(libs.plugins.dokka)
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.taskTree)
alias(libs.plugins.multiJvmTesting)
alias(libs.plugins.kotlin.qa)
}
dependencies {
implementation(project(":jakta-state-machine"))
implementation(project(":jakta-bdi"))
implementation(project(":jakta-dsl"))
}
val Provider<PluginDependency>.id: String get() = get().pluginId
allprojects {
group = rootProject.group
with(rootProject.libs.plugins) {
apply(plugin = publishOnCentral.id)
apply(plugin = gitSemVer.id)
apply(plugin = dokka.id)
apply(plugin = kotlin.jvm.id)
apply(plugin = taskTree.id)
apply(plugin = multiJvmTesting.id)
apply(plugin = kotlin.qa.id)
}
repositories {
mavenCentral()
}
gitSemVer {
versionPrefix.set("v")
excludeLightweightTags()
assignGitSemanticVersion()
}
dependencies {
implementation(rootProject.libs.kotlin.stdlib)
testImplementation(rootProject.libs.bundles.kotlin.testing)
}
// ====== COMPILATION TASKS =====
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
allWarningsAsErrors = true
freeCompilerArgs.add("-Xcontext-receivers")
freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn")
}
}
multiJvm {
jvmVersionForCompilation.set(17)
}
signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
}
publishOnCentral {
projectLongName.set("JaKtA")
projectDescription.set("A Kotlin internal DSL for the definition of BDI agents")
val repoOwner = "jakta-bdi"
scmConnection.set("scm:git:https://github.com/$repoOwner/${rootProject.name}")
projectUrl.set("https://github.com/$repoOwner/${rootProject.name}")
publishing {
publications {
withType<MavenPublication>().configureEach {
pom {
developers {
developer {
id.set("anitvam")
name.set("Martina Baiardi")
email.set("[email protected]")
}
}
}
}
}
}
}
tasks {
test {
useJUnitPlatform()
testLogging {
showStandardStreams = true
showCauses = true
showStackTraces = true
events(*org.gradle.api.tasks.testing.logging.TestLogEvent.values())
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
}
}
}
tasks.detekt {
onlyIf {
project.hasProperty("runDetect")
}
}
tasks.detektMain {
onlyIf {
project.hasProperty("runDetect")
}
}
}