-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
76 lines (65 loc) · 1.9 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
val kotlinVersion: String by project
val artifactIdPrefix: String by project
val productVersion: String by project
plugins {
kotlin("jvm")
id("io.gitlab.arturbosch.detekt") version "1.23.7"
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
`maven-publish`
}
group = "com.github.momosetkn.$artifactIdPrefix"
version = "1.0-SNAPSHOT"
allprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "io.gitlab.arturbosch.detekt")
apply(plugin = "org.jlleitschuh.gradle.ktlint")
repositories {
mavenCentral()
mavenLocal()
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
freeCompilerArgs.addAll(listOf("-Xjvm-default=all"))
}
}
detekt {
parallel = true
autoCorrect = true
config.from("$rootDir/config/detekt/detekt.yml")
buildUponDefaultConfig = true
basePath = rootDir.absolutePath
}
ktlint {
version.set("1.3.1")
}
}
val libraryProjects =
subprojects.filter {
it.name in listOf(
"querydsl",
)
}
configure(libraryProjects) {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "maven-publish")
val sourcesJar by tasks.creating(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
}
publishing {
publications {
create<MavenPublication>("release") {
from(components["java"])
artifact(sourcesJar)
groupId = "com.github.momosetkn.$artifactIdPrefix"
artifactId = "$artifactIdPrefix-${project.name}"
version = productVersion
}
}
repositories {
maven { url = uri("https://jitpack.io") }
}
}
}
dependencies {}