-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
117 lines (102 loc) · 3.2 KB
/
build.gradle
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
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.4.32'
id 'maven-publish'
id 'signing'
id "org.jetbrains.dokka" version "0.10.1"
}
group 'com.medly'
version '0.0.2'
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "io.gitlab.arturbosch.detekt:detekt-api:1.9.0"
testImplementation 'io.gitlab.arturbosch.detekt:detekt-test:1.9.0'
testImplementation 'org.assertj:assertj-core:3.16.1'
testImplementation "org.spekframework.spek2:spek-dsl-jvm:2.0.9"
testImplementation "org.spekframework.spek2:spek-runner-junit5:2.0.9"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
test {
useJUnitPlatform()
}
tasks {
dokka {
outputFormat = "html"
outputDirectory = "$buildDir/javadoc"
}
}
task dokkaJar(type: Jar) {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembles Kotlin docs with Dokka"
archiveClassifier.set("javadoc")
from(tasks.dokka)
dependsOn(tasks.dokka)
}
task sourcesJar(type: Jar) {
archiveClassifier.set("sources")
from(sourceSets.getByName("main").allSource)
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact dokkaJar
pom {
name = "detekt-extensions"
description = "detekt-extensions"
url.set("https://github.com/medly/detekt-extensions")
licenses {
license {
name = "MIT"
url = "https://opensource.org/licenses/MIT"
}
}
developers {
developer {
id = "RajatVaryani"
name = "Rajat Varyani"
email = "[email protected]"
}
developer {
id = "kdabir"
name = "Kunal Dabir"
email = "[email protected]"
}
developer {
id = "niraj8"
name = "Niraj Palecha"
email = "[email protected]"
}
}
scm {
connection = "scm:git:[email protected]:medly/detekt-extensions.git"
developerConnection = "scm:git:ssh://github.com/medly/detekt-extensions.git"
url = "https://github.com/medly/detekt-extensions"
}
}
}
}
repositories {
maven {
credentials {
username System.getenv("OSSRH_USERNAME")
password System.getenv("OSSRH_PASSWORD")
}
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
}
}
}
signing {
def signingKey = System.getenv("OSSRH_SIGNING_SECRET_KEY")
def signingPassword = System.getenv("OSSRH_SIGNING_PASSPHRASE")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava // must come after above block
}