-
-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathbuild.gradle
More file actions
98 lines (84 loc) · 3.08 KB
/
build.gradle
File metadata and controls
98 lines (84 loc) · 3.08 KB
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
plugins {
id "com.diffplug.spotless" version "6.25.0"
}
apply plugin: 'application'
dependencies {
implementation project(':openapi-style-validator-lib')
implementation 'commons-cli:commons-cli:1.9.0'
implementation 'org.slf4j:slf4j-jdk14:2.0.16'
implementation 'io.swagger.parser.v3:swagger-parser:2.1.19'
implementation 'org.openapitools.empoa:empoa-swagger-core:2.1.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.23.1'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.24.2'
testImplementation "org.mockito:mockito-core:5.13.0"
}
mainClassName = 'org.openapitools.openapistylevalidator.cli.Main'
apply plugin: 'com.github.johnrengelman.shadow'
def generatedVersionDir = "${buildDir}/generated-version"
sourceSets {
main {
output.dir(generatedVersionDir, builtBy: 'generateVersionProperties')
}
}
task generateVersionProperties {
doLast {
def propertiesFile = file "$generatedVersionDir/version.properties"
propertiesFile.parentFile.mkdirs()
def properties = new Properties()
properties.setProperty("version", rootProject.version.toString())
propertiesFile.withWriter { properties.store(it, null) }
}
}
processResources.dependsOn generateVersionProperties
shadowJar {
//noinspection GroovyAccessibility
archiveBaseName = "openapi-style-validator-cli"
//noinspection GroovyAccessibility
archiveClassifier = 'all'
}
project.tasks.assemble.dependsOn project.tasks.shadowJar
java {
withJavadocJar()
withSourcesJar()
}
spotless {
java {
removeUnusedImports()
trimTrailingWhitespace()
palantirJavaFormat()
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'openapi-style-validator-cli'
pom {
name = 'OpenAPI Style Validator - cli'
description = 'Command line interface to validate the style and standards of an OpenAPI specification'
packaging = 'jar'
url = 'https://openapitools.github.io/openapi-style-validator/'
inceptionYear = "2019"
licenses {
license {
name = 'Apache 2.0 License'
url = 'http://www.apache.org/licenses/LICENSE-2.0'
}
}
developers {
developer {
id = 'JFCote'
name = 'Jean-Francois Cote'
email = 'jcote@stingray.com'
}
}
scm {
connection = 'scm:git:https://github.com/openapitools/openapi-style-validator.git'
developerConnection = 'scm:git:https://github.com/openapitools/openapi-style-validator.git'
url = 'https://github.com/openapitools/openapi-style-validator/'
}
}
from components.java
}
}
}