-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
134 lines (112 loc) · 3.12 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
import java.nio.charset.StandardCharsets
plugins {
id "java"
id "java-library"
id "org.sonarqube" version "2.8"
id 'jacoco'
id 'maven-publish'
id 'signing'
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
allprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
group = "com.github.erosb"
version = "0.0.0-SNAPSHOT"
description = "Forked version of openapi4j aiming for openapi 3.1 support"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
compileJava.options.encoding = StandardCharsets.UTF_8.toString()
tasks.withType(JavaCompile) {
options.encoding = StandardCharsets.UTF_8.toString()
}
repositories {
mavenCentral()
mavenLocal()
}
jar {
manifest {
attributes 'Build-date': new Date()
attributes 'Implementation-Title': project.name
attributes 'Implementation-Version': project.version
}
}
}
dependencies {
api("com.fasterxml.jackson.core:jackson-databind:2.18.0")
api("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.18.0")
api("com.github.erosb:json-sKema:0.20.0")
testImplementation("junit:junit:4.13.2")
testImplementation("org.skyscreamer:jsonassert:1.5.0")
compileOnly("org.json:json:20240303")
compileOnly("commons-fileupload:commons-fileupload:1.5")
testImplementation("org.json:json:20240303")
testImplementation("commons-fileupload:commons-fileupload:1.5")
}
sonarqube {
properties {
property "sonar.coverage.jacoco.xmlReportPaths", "${buildDir}/reports/jacoco/codeCoverageReport/codeCoverageReport.xml"
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
mavenJava(MavenPublication) {
logger.warn(project.group + " : " + project.name + " : " + project.version)
logger.warn(project.description)
groupId = project.group
artifactId = project.name
version = project.version
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = project.name
description = project.description
url = "https://github.com/erosb/kappa"
licenses {
license {
name = "Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = 'erosb'
name = 'Bence Eros'
email = '[email protected]'
}
}
scm {
connection = "scm:git:git://github.com:erosb/kappa.git"
developerConnection = "scm:git:https://github.com/erosb/kappa"
url = "https://github.com/erosb/kappa"
}
}
}
}
}
tasks.withType(Sign) {
onlyIf { !version.endsWith("SNAPSHOT") }
}
signing {
useGpgCmd()
sign publishing.publications.mavenJava
}
nexusPublishing {
repositories {
sonatype {
username = System.getenv("publishUsername")
password = System.getenv("publishPassword")
}
}
}