-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
148 lines (126 loc) · 4.03 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
import java.time.Duration
plugins {
java
signing
id("maven-publish")
kotlin("jvm") version "1.9.24"
kotlin("plugin.serialization") version "1.9.24"
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}
buildscript {
repositories {
mavenCentral()
google()
mavenLocal()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24")
classpath("org.jetbrains.kotlin:kotlin-android-extensions:1.9.24")
classpath("com.android.tools.build:gradle:8.6.1")
}
}
val gradleScriptDir by extra("${rootProject.projectDir}/gradle")
nexusPublishing {
connectTimeout.set(Duration.ofMinutes(7))
clientTimeout.set(Duration.ofMinutes(7))
transitionCheckOptions {
maxRetries.set(100)
delayBetween.set(Duration.ofSeconds(10))
}
repositories {
sonatype()
}
}
allprojects {
group = "io.qase"
version = "1.0.0"
repositories {
mavenCentral()
google()
mavenLocal()
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
}
}
configure(
subprojects
.filter { !it.name.contains("android") }
.filter { !it.name.contains("kaspresso") }
) {
apply(plugin = "signing")
apply(plugin = "maven-publish")
apply(plugin = "org.jetbrains.kotlin.jvm")
dependencies {
implementation(kotlin("stdlib"))
}
tasks.jar {
manifest {
attributes(
mapOf(
"Implementation-Title" to project.name,
"Implementation-Version" to project.version
)
)
}
}
val sourceJar by tasks.creating(Jar::class) {
from(sourceSets.getByName("main").allSource)
archiveClassifier.set("sources")
}
val javadocJar by tasks.creating(Jar::class) {
from(tasks.getByName("javadoc"))
archiveClassifier.set("javadoc")
}
tasks.withType(Javadoc::class) {
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
publishing {
publications {
create<MavenPublication>("maven") {
artifact(javadocJar)
artifact(sourceJar)
from(components["java"])
pom {
name.set(project.name)
description.set("Module ${project.name} of Qase Kotlin reporters.")
url.set("https://github.com/qase-tms/qase-kotlin")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("qase-tms")
name.set("Qase Team")
email.set("[email protected]")
}
}
scm {
developerConnection.set("scm:git:git://github.com/qase-tms/qase-kotlin")
connection.set("scm:git:git://github.com/qase-tms/qase-kotlin")
url.set("https://github.com/qase-tms/qase-kotlin")
}
issueManagement {
system.set("GitHub Issues")
url.set("https://github.com/qase-tms/qase-kotlin/issue")
}
}
}
}
}
signing {
sign(publishing.publications["maven"])
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile>().configureEach {
jvmTargetValidationMode.set(org.jetbrains.kotlin.gradle.dsl.jvm.JvmTargetValidationMode.WARNING)
}