-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
161 lines (142 loc) · 5.45 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
152
153
154
155
156
157
158
159
160
161
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.time.Instant
import java.time.format.DateTimeFormatter
plugins {
`maven-publish`
signing
kotlin("jvm") version "1.4.0"
id("com.jfrog.bintray") version "1.8.5"
id("org.ajoberstar.reckon") version "0.12.0"
}
val group = "com.chutneytesting"
val timestamp: String = DateTimeFormatter.ISO_INSTANT.format(Instant.now())
val githubUrl = "https://github.com/chutney-testing/${project.name}"
val publicationName = "chutneyKotlinDSL"
reckon {
scopeFromProp()
snapshotFromProp()
}
repositories {
mavenCentral()
jcenter() // JCenter will be able to resolve dependencies until February 1, 2022 without changes. (https://blog.gradle.org/jcenter-shutdown)
}
dependencies {
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.5")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.5")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.4.0")
implementation("org.jetbrains.kotlin:kotlin-script-runtime:1.4.0")
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation("ch.qos.logback:logback-classic:1.2.3")
implementation("com.chutneytesting:engine:1.3.12")
implementation("com.chutneytesting:environment:1.3.12")
implementation("org.junit.jupiter:junit-jupiter-api:5.6.3")
implementation("org.assertj:assertj-core:3.21.0")
implementation("org.springframework:spring-core:5.3.10")
runtimeOnly("com.chutneytesting:task-impl:1.3.12")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.3")
testImplementation("com.gregwoodfill.assert:kotlin-json-assert:0.1.0")
testImplementation("org.springframework:spring-expression:5.1.5.RELEASE")
testImplementation(kotlin("scripting-jsr223"))
testImplementation("org.mockito.kotlin:mockito-kotlin:3.2.0")
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
tasks {
test {
useJUnitPlatform()
testLogging {
events("passed", "failed", "skipped")
showStandardStreams = true
}
}
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.javadoc {
if (JavaVersion.current().isJava11Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}
publishing {
publications {
create<MavenPublication>(publicationName) {
groupId = group
artifactId = project.name
version = project.version.toString()
from(components["java"])
pom {
name.set("Chutney Kotlin DSL")
description.set("Generates Chutney scenarios using Kotlin.")
inceptionYear.set("2020")
url.set(githubUrl)
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
}
}
scm {
url.set("${githubUrl}.git")
connection.set("scm:git:[email protected]:chutney-testing/${project.name}.git")
developerConnection.set("scm:git:[email protected]:chutney-testing/${project.name}.git")
tag.set(project.version.toString().takeUnless { it.endsWith("SNAPSHOT") })
}
issueManagement {
system.set("github")
url.set("${githubUrl}/issues")
}
ciManagement {
system.set("github-ci")
url.set("${githubUrl}/actions")
}
developers {
developer {
id.set("iguissouma ")
name.set("Issam Guissouma")
}
developer {
id.set("boddissattva")
name.set("Matthieu Gensollen")
}
developer {
id.set("bessonm")
name.set("Mael Besson")
}
developer {
id.set("nbrouand")
name.set("Nicolas Brouand")
}
}
}
}
}
repositories {
maven {
name = "OSSRH"
val releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots"
val ossrhUsername =
System.getenv("OSSRH_USERNAME") // Use token ; https://s01.oss.sonatype.org/#profile;User%20Token
val ossrhPassword = System.getenv("OSSRH_PASSWORD") // Use token
url = uri(releasesRepoUrl)
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}
signing {
//useGpgCmd()
// Format: "0x12345678" ; gpg --list-keys --keyid-format 0xSHORT
val signingKeyId: String? = System.getenv("CHUTNEY_GPG_KEY_ID")
// gpg -a --export-secret-subkeys KEY_ID
val signingKey: String? = System.getenv("CHUTNEY_GPG_KEY")
val signingPassword: String? = System.getenv("CHUTNEY_GPG_PASSPHRASE")
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign(publishing.publications[publicationName])
}