-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
76 lines (64 loc) · 2.21 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
plugins {
id 'groovy-gradle-plugin'
id 'com.gradle.plugin-publish' version '1.1.0'
id 'signing'
}
group 'io.redskap'
version '2.5.0-SNAPSHOT'
tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
gradlePlugin {
website = 'http://redskap.io'
vcsUrl = 'https://github.com/redskap/swagger-brake-gradle'
plugins {
swaggerBrake {
id = 'io.redskap.swagger-brake'
displayName = "Swagger Brake Gradle plugin"
description = 'A plugin to check Swagger definition files for any breaking API changes'
tags.addAll('swagger', 'api', 'breaking-change', 'REST')
implementationClass = 'io.redskap.swagger.brake.gradle.SwaggerBrakePlugin'
}
}
}
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
dependencies {
implementation "io.redskap:swagger-brake:2.5.0-SNAPSHOT"
implementation "org.apache.commons:commons-collections4:4.4"
implementation "org.apache.commons:commons-lang3:3.13.0"
implementation 'com.google.guava:guava:32.1.2-jre'
testImplementation "net.bytebuddy:byte-buddy:1.9.12"
testImplementation "org.objenesis:objenesis:3.0.1"
testImplementation ("org.spockframework:spock-core:2.3-groovy-3.0") {
exclude group:'org.codehaus.groovy'
}
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
testImplementation gradleTestKit()
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
def isReleaseBuild() {
return version.contains("SNAPSHOT") == false
}
if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
publishing {
repositories {
maven {
url = isReleaseBuild() ? 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' : 'https://oss.sonatype.org/content/repositories/snapshots/'
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}
}