-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
144 lines (120 loc) · 4.91 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
135
136
137
138
139
140
141
142
143
144
plugins {
id 'java-gradle-plugin'
id "com.gradle.plugin-publish" version "0.14.0"
id 'net.researchgate.release' version '2.8.1'
}
group 'io.github.vlsergey.springdatarestutils'
gradlePlugin {
plugins {
springdatarestutils {
id = 'io.github.vlsergey.spring-data-rest-utils'
implementationClass = 'io.github.vlsergey.springdatarestutils.PluginImpl'
}
}
}
ext {
lombokVersion = '1.18.12'
queryDslVersion = '4.4.0'
}
compileJava {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
if (JavaVersion.current().isJava11Compatible()) {
options.release = 8
}
options.compilerArgs << '-parameters'
options.debugOptions.debugLevel = "source,lines,vars"
options.encoding = 'UTF-8'
}
compileTestJava {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
if (JavaVersion.current().isJava11Compatible()) {
options.release = 8
}
options.compilerArgs << '-parameters'
options.debugOptions.debugLevel = "source,lines,vars"
options.encoding = 'UTF-8'
}
repositories {
mavenCentral()
}
dependencies {
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: lombokVersion
compileOnly group: 'org.projectlombok', name: 'lombok', version: lombokVersion
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.12.3'
implementation group: 'io.swagger.core.v3', name: 'swagger-core', version: '2.1.10'
implementation group: 'io.swagger.core.v3', name: 'swagger-models', version: '2.1.10'
compileOnly group: 'org.reflections', name: 'reflections', version: '0.9.12'
compileOnly group: 'org.springframework.data', name: 'spring-data-jpa', version: '2.5.1'
compileOnly group: 'org.springframework.data', name: 'spring-data-rest-core', version: '3.5.1'
testAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: lombokVersion
testAnnotationProcessor("com.querydsl:querydsl-apt:${queryDslVersion}:jpa")
testAnnotationProcessor group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
testCompileOnly group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
testImplementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
testImplementation group: 'com.querydsl', name: 'querydsl-jpa', version: queryDslVersion
testImplementation group: 'javax.persistence', name: 'javax.persistence-api', version: '2.2'
testImplementation(platform('org.junit:junit-bom:5.7.2'))
testImplementation('org.junit.jupiter:junit-jupiter')
testImplementation group: 'org.hibernate', name: 'hibernate-core', version: '5.5.3.Final'
testImplementation group: 'org.hibernate.validator', name: 'hibernate-validator', version: '6.2.0.Final'
testImplementation group: 'org.projectlombok', name: 'lombok', version: lombokVersion
testImplementation group: 'org.openapi4j', name: 'openapi-parser', version: '1.0.7'
testImplementation group: 'org.reflections', name: 'reflections', version: '0.9.12'
testImplementation group: 'org.springframework.data', name: 'spring-data-jpa', version: '2.5.1'
testImplementation group: 'org.springframework.data', name: 'spring-data-rest-core', version: '3.5.1'
testImplementation group: 'org.springframework.security', name: 'spring-security-core', version: '5.5.2'
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
task regenerateReadme {
doLast {
def releaseVersion = project.property('release.releaseVersion');
copy {
from file( 'README.template.md')
rename 'README\\.template\\.md', 'README.md'
into project.projectDir
expand([ "version": releaseVersion ])
}
exec {
workingDir project.projectDir
commandLine 'git'
args 'add', 'README.md'
}
exec {
workingDir project.projectDir
commandLine 'git'
args 'commit', '-m', 'Update version in README.md to ' + releaseVersion
}
}
}
beforeReleaseBuild.dependsOn regenerateReadme
release {
failOnCommitNeeded = true
failOnSnapshotDependencies = true
failOnUnversionedFiles = true
failOnUpdateNeeded = true
pushReleaseVersionBranch = false
}
afterReleaseBuild.dependsOn publishPlugins
pluginBundle {
website = 'https://github.com/vlsergey/spring-data-rest-utils'
vcsUrl = 'https://github.com/vlsergey/spring-data-rest-utils.git'
description = 'Gradle plug-in to generate different specifications (such as OpenAPI) from Spring Data REST entities and repositories'
tags = ['spring', 'hateoas', 'rest', 'typescript', 'codegeneration', 'OpenAPI']
mavenCoordinates {
groupId = project.group.toString()
artifactId = project.name
version = project.version.toString()
}
plugins {
springdatarestutils {
displayName = 'Generate OpenAPI specification from Spring Data REST entities and repositories'
}
}
}