-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
180 lines (168 loc) · 6.37 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
val publishedMavenId: String = "org.hyperledger.identus.apollo"
plugins {
id("org.jetbrains.dokka") version "1.9.20"
id("org.jlleitschuh.gradle.ktlint") version "11.6.1"
id("maven-publish")
id("org.jetbrains.kotlinx.kover") version "0.7.5"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
id("signing")
id("com.android.library") version "8.1.4" apply false
}
buildscript {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23")
classpath("org.jetbrains.dokka:dokka-base:1.9.20")
}
}
group = publishedMavenId
allprojects {
group = publishedMavenId
repositories {
google()
mavenCentral()
}
apply(plugin = "org.gradle.maven-publish")
apply(plugin = "org.gradle.signing")
publishing {
publications.withType<MavenPublication> {
groupId = publishedMavenId
artifactId = project.name
version = project.version.toString()
pom {
name.set("Identus Apollo")
description.set("Collection of the cryptographic methods used all around Identus platform")
url.set("https://docs.atalaprism.io/")
organization {
name.set("Hyperledger")
url.set("https://www.hyperledger.org/")
}
issueManagement {
system.set("Github")
url.set("https://github.com/hyperledger/identus-apollo")
}
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("hamada147")
name.set("Ahmed Moussa")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
url.set("https://github.com/hamada147")
}
developer {
id.set("amagyar-iohk")
name.set("Allain Magyar")
email.set("[email protected]")
organization.set("IOG")
roles.add("qc")
}
developer {
id.set("antonbaliasnikov")
name.set("Anton Baliasnikov")
email.set("[email protected]")
organization.set("IOG")
roles.add("qc")
}
developer {
id.set("elribonazo")
name.set("Javier Ribó")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
developer {
id.set("goncalo-frade-iohk")
name.set("Gonçalo Frade")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
developer {
id.set("curtis-h")
name.set("Curtis Harding")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
developer {
id.set("cristianIOHK")
name.set("Cristian Gonzalez")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
developer {
id.set("yshyn-iohk")
name.set("Yurii Shynbuiev")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
}
scm {
connection.set("scm:git:git://[email protected]/hyperledger/identus-apollo.git")
developerConnection.set("scm:git:ssh://[email protected]/hyperledger/identus-apollo.git")
url.set("https://github.com/hyperledger/identus-apollo")
}
}
signing {
useInMemoryPgpKeys(
project.findProperty("signing.signingSecretKey") as String? ?: System.getenv("OSSRH_GPG_SECRET_KEY"),
project.findProperty("signing.signingSecretKeyPassword") as String? ?: System.getenv("OSSRH_GPG_SECRET_KEY_PASSWORD")
)
sign(this@withType)
}
}
}
}
subprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
apply(plugin = "org.jetbrains.kotlinx.kover")
koverReport {
filters {
excludes {
classes(
"org.hyperledger.identus.apollo.utils.bip39.wordlists.*"
)
}
}
}
ktlint {
verbose.set(true)
outputToConsole.set(true)
filter {
exclude {
it.file.toString().contains("external")
}
exclude {
it.file.toString() == "BNjs.kt" || it.file.toString() == "Curve.kt" || it.file.toString() == "PresetCurve.kt" ||
it.file.toString() == "Ellipticjs.kt" || it.file.toString() == "secp256k1js.kt"
}
exclude {
it.file.toString().contains("external")
}
exclude { projectDir.toURI().relativize(it.file.toURI()).path.contains("/external/") }
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://oss.sonatype.org/content/repositories/releases/"))
username.set(System.getenv("OSSRH_USERNAME"))
password.set(System.getenv("OSSRH_TOKEN"))
}
}
}