-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
99 lines (82 loc) · 2.98 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
plugins {
id 'java-gradle-plugin'
id 'groovy'
id 'com.gradle.plugin-publish' version '1.2.0'
id 'com.palantir.git-version' version '3.0.0'
id 'maven-publish'
id 'com.github.ben-manes.versions' version '0.46.0'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
}
dependencies {
implementation gradleApi()
implementation localGroovy()
implementation "dev.guardrail:guardrail_2.13:0.71.0"
implementation "dev.guardrail:guardrail-cli_2.13:0.71.0"
implementation "dev.guardrail:guardrail-core_2.13:0.75.4"
implementation "dev.guardrail:guardrail-java-async-http_2.13:0.72.0"
implementation "dev.guardrail:guardrail-java-dropwizard_2.13:0.72.0"
implementation "dev.guardrail:guardrail-java-spring-mvc_2.13:0.71.2"
implementation "dev.guardrail:guardrail-java-support_2.13:0.73.1"
implementation "dev.guardrail:guardrail-scala-akka-http_2.13:0.76.0"
implementation "dev.guardrail:guardrail-scala-dropwizard_2.13:0.72.0"
implementation "dev.guardrail:guardrail-scala-http4s_2.13:0.76.1"
implementation "dev.guardrail:guardrail-scala-support_2.13:0.75.3"
testImplementation platform("org.spockframework:spock-bom:2.3-groovy-3.0")
testImplementation "org.spockframework:spock-core"
testImplementation 'cglib:cglib-nodep:3.3.0'
}
group = 'dev.guardrail'
version = gitVersion().substring(1) // gradle-git-version does not support leading `v` in `v0.1.2`: https://github.com/palantir/gradle-git-version/issues/72
description = 'Principled code generation from OpenAPI specifications'
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
classifier "sources"
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier "javadoc"
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
gradlePlugin {
website = 'https://guardrail.dev/'
vcsUrl = 'https://github.com/guardrail-dev/guardrail'
plugins {
guardrailPlugin {
id = project.group
implementationClass = 'dev.guardrail.GuardrailGradlePlugin'
displayName = 'guardrail Gradle Plugin'
description = project.description
tags.set(['openapi', 'swagger', 'codegen', 'scala', 'java'])
}
}
}
// Add a source set for the functional test suite
sourceSets {
functionalTest {
}
}
gradlePlugin.testSourceSets(sourceSets.functionalTest)
configurations.functionalTestImplementation.extendsFrom(configurations.testImplementation)
// Add a task to run the functional tests
task functionalTest(type: Test) {
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
}
check {
// Run the functional tests as part of `check`
dependsOn(tasks.functionalTest)
}