-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.gradle.kts
151 lines (129 loc) · 4.3 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
149
150
151
plugins {
java
signing
`maven-publish`
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
kotlin("jvm") version Versions.kotlin
kotlin("plugin.serialization") version Versions.kotlin
}
buildscript {
repositories {
mavenCentral()
google()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}")
classpath("org.jetbrains.kotlin:kotlin-android-extensions:${Versions.kotlin}")
classpath("com.android.tools.build:gradle:${Versions.Android.gradlePlugin}")
}
}
val gradleScriptDir by extra("${rootProject.projectDir}/gradle")
nexusPublishing {
repositories {
sonatype()
}
}
allprojects {
group = "io.qameta.allure"
version = version
repositories {
mavenCentral()
google()
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_6.toString()
}
}
}
configure(subprojects
.filter { !it.name.contains("android") }
.filter { it.parent?.name != "samples" }
) {
apply(plugin = "signing")
apply(plugin = "maven-publish")
apply(plugin = "org.jetbrains.kotlin.jvm")
dependencies {
implementation(kotlin("stdlib"))
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
}
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")
}
publishing {
publications {
create<MavenPublication>("maven") {
artifact(javadocJar)
artifact(sourceJar)
from(components["java"])
pom {
name.set(project.name)
description.set("Module ${project.name} of Allure Framework.")
url.set("https://github.com/allure-framework/allure-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("kamildziadek")
name.set("Kamil Dziadek")
email.set("[email protected]")
}
developer {
id.set("viclovsky")
name.set("Victor Orlovsky")
email.set("[email protected]")
}
}
scm {
developerConnection.set("scm:git:git://github.com/allure-framework/allure-kotlin")
connection.set("scm:git:git://github.com/allure-framework/allure-kotlin")
url.set("https://github.com/allure-framework/allure-kotlin")
}
issueManagement {
system.set("GitHub Issues")
url.set("hhttps://github.com/allure-framework/allure-kotlin/issue")
}
}
}
}
}
signing {
sign(publishing.publications["maven"])
}
tasks.test {
systemProperty("allure.model.indentOutput", "true")
testLogging {
events("passed", "skipped", "failed")
}
}
tasks.processTestResources {
filesMatching("**/allure.properties") {
filter {
it.replace("#project.description#", project.description ?: project.name)
}
}
}
}