forked from springfox/springfox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
118 lines (96 loc) · 3.43 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
import springfox.gradlebuild.utils.ProjectDefinitions
import springfox.gradlebuild.version.BuildscriptVersionResolver
import springfox.gradlebuild.version.SemanticVersion
import springfox.gradlebuild.version.SnapshotVersion
import springfox.gradlebuild.version.SoftwareVersion
apply from: "$rootDir/gradle/dependencies.gradle"
apply from: "$rootDir/gradle/idea.gradle"
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.github.adrianbk:gradle-jvmsrc-plugin:0.6.1"
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1"
classpath "com.github.adrianbk:gradle-travisci-trigger-plugin:1.0.0"
classpath 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1'
classpath "com.ofg:uptodate-gradle-plugin:1.5.0"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1"
classpath "org.asciidoctor:asciidoctor-gradle-plugin:1.5.2"
}
}
apply plugin: 'build-dashboard'
apply plugin: 'project-report'
ext {
apiKey = System.getenv('GIT_HUB_API_KEY')
jdkVersion = 1.6
}
apply plugin: 'springfox-multi-release'
SoftwareVersion currentVersion = BuildscriptVersionResolver.projectVersion(project,
new SnapshotVersion(SemanticVersion.get(file("$rootDir/version.properties")))
)
version = currentVersion
configure(ProjectDefinitions.publishable(project)) { subproject ->
apply plugin: "com.ofg.uptodate"
//Not strictly groovy projects but useful for the IDE to recognise groovy test sources
apply plugin: 'groovy' //gradle groovy plugin extends the java plugin
test {
maxParallelForks = 2
}
ext {
jdkVersion = 1.6
}
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = jdkVersion
targetCompatibility = jdkVersion
configurations {
provided
compile.extendsFrom provided
}
group = 'io.springfox'
version = currentVersion
apply plugin: 'com.github.adrianbk.jvmsrc'
jvmsrc {
packageName "springfox"
}
jar {
manifest {
attributes(
'Implementation-Title': "${project.name}",
'Implementation-Version': version.toString(),
'Created-By': System.getProperty('java.version') + ' (' + System.getProperty('java.vendor') + ')',
'Built-With': "gradle-${project.getGradle().getGradleVersion()}, groovy-${GroovySystem.getVersion()}",
'Build-Time': "${new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")}",
'Built-By': System.getProperty('user.name'),
'Built-On': "${InetAddress.localHost.hostName}/${InetAddress.localHost.hostAddress}"
)
}
}
apply plugin: 'checkstyle'
checkstyle {
configFile = file("$rootDir/config/checkstyle.xml")
}
checkstyleMain.source = "src/main/java"
apply plugin: 'maven-publish'
apply from: "$rootDir/gradle/publishing.gradle"
apply from: "$rootDir/gradle/artifacts.gradle"
apply from: "$rootDir/gradle/bintray_publish.gradle"
apply from: "$rootDir/gradle/coverage.gradle"
//Commented PMD and Findbugs as its taking too much time for very little value
//Perhaps run every 20 CI builds (mod of ci build number)
// apply from: "$rootDir/gradle/code-quality.gradle"
repositories {
jcenter()
}
}
apply plugin: "com.github.adrianbk.tcitrigger"
tciTrigger {
gitHubRepo 'adrianbk/swagger-springmvc-demo'
gitHubApiKeyVarName = 'GIT_HUB_API_KEY'
travisVariable {
name = "LATEST_SSMVC_VERSION"
value = "${version}"
visible = true
}
}
apply from: "$rootDir/gradle/documentation.gradle"