-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
117 lines (95 loc) · 2.69 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
@file:Suppress("GradlePackageUpdate")
import java.math.BigDecimal
plugins {
java
jacoco
`maven-publish`
}
group = "io.eyesprotocol.validator"
version = "1.0.0"
java.sourceCompatibility = JavaVersion.VERSION_1_8
java.targetCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
dependencies {
// javax.validation api
implementation("jakarta.validation:jakarta.validation-api:2.0.2")
implementation("org.bouncycastle:bcprov-jdk15on:1.69")
// Junit5
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.8.2")
// java.validation provider (test)
testImplementation("org.hibernate:hibernate-validator:6.2.0.Final")
testImplementation("org.glassfish:jakarta.el:3.0.3")
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.jacocoTestReport {
reports {
html.required.set(true)
xml.required.set(false)
csv.required.set(true)
}
}
tasks.jacocoTestCoverageVerification {
violationRules {
rule {
element = "CLASS"
limit {
counter = "BRANCH"
value = "COVEREDRATIO"
minimum = BigDecimal(0.90)
}
}
}
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
repositories {
maven {
name = "OSSRH"
val releasesRepoUrl = "https://s01.oss.sonatype.org/content/repositories/releases/"
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
maven {
name = "MavenCentral"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
create<MavenPublication>("maven") {
groupId = rootProject.group.toString()
artifactId = rootProject.name
version = rootProject.version.toString()
from(components["java"])
pom {
name.set("EYES Protocol Validator - Ethereum")
description.set("Ethereum validator with JSR380(aka Bean validation)")
url.set("https://eyesprotocol.net")
licenses {
license {
name.set("GNU Lesser General Public License v3.0")
url.set("https://www.gnu.org/licenses/lgpl-3.0.html")
}
}
scm {
url.set("https://github.com/eyesprotocol/ethereum-validator")
connection.set("scm:git:[email protected]:eyesprotocol/ethereum-validator.git")
}
}
}
}
}