-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.gradle
150 lines (127 loc) · 4.47 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
145
146
147
148
149
150
group = 'org.openrepose'
def baseVersion = '2.5.0'
version = project.hasProperty('release') ? baseVersion : "$baseVersion-SNAPSHOT"
description = "Gradle plugin to ease development with XSD's using the jaxb ant task"
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.gradle.publish:plugin-publish-plugin:0.10.1'
classpath 'com.netflix.nebula:gradle-git-scm-plugin:3.0.1'
classpath 'gradle.plugin.org.ysb33r.gradle:gradletest:1.1'
classpath 'gradle.plugin.org.openrepose:gradle-codacy-plugin:1.0.0'
}
}
apply plugin: 'com.gradle.plugin-publish'
apply plugin: 'groovy'
apply plugin: 'maven-publish'
apply plugin: 'nebula.gradle-git-scm'
apply plugin: 'org.ysb33r.gradletest'
apply plugin: 'jacoco'
apply plugin: 'org.openrepose.gradle.plugins.codacy'
repositories {
jcenter()
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.7
dependencies {
compile gradleApi()
compile localGroovy()
compile 'org.codehaus.groovy:groovy-all:2.4.12'
compile 'org.slf4j:slf4j-api:1.7.6'
compile 'com.google.inject:guice:3.0'
compile 'com.google.inject.extensions:guice-assistedinject:3.0'
//testCompile 'org.spockframework:spock-core:0.7-groovy-1.8' // v1.12
//testCompile 'org.spockframework:spock-core:1.0-groovy-2.3' // v2.0 - v2.7
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4' // v2.8 - v2.10
testCompile 'cglib:cglib-nodep:2.2'
testCompile 'org.objenesis:objenesis:1.2'
gradleTest 'org.glassfish.jaxb:jaxb-xjc:2.2.11'
gradleTest 'org.glassfish.jaxb:jaxb-runtime:2.2.11'
}
// NOTE: The gradle.publish.key and gradle.publish.secret need added to your ~/.gradle/gradle.properties as per the
// instructions located at https://plugins.gradle.org/docs/submit
pluginBundle {
website = 'https://github.com/rackerlabs/gradle-jaxb-plugin'
vcsUrl = 'https://github.com/rackerlabs/gradle-jaxb-plugin'
description = project.description
tags = ['jaxb', 'xsd', 'xjc']
plugins {
gradleJaxbPlugin {
id = 'org.openrepose.gradle.plugins.jaxb'
displayName = 'Gradle JAXB plugin'
}
}
}
publishing {
publications {
mavenJar(MavenPublication) {
from components.java
}
}
repositories {
maven {
name 'releases.maven.research.rackspace.com'
url 'https://maven.research.rackspacecloud.com/content/repositories/releases'
credentials {
// NOTE: These properties should be in your ~/.gradle/gradle.properties
username property('maven.repo.username')
password property('maven.repo.password')
}
}
}
}
task('tagVersion', description: 'Tag the repository with the current version.', group: 'release') {
doLast {
scmFactory.create().tag(version)
}
}
task('release', description: 'Release the project and publish to public repo.', group: 'release', dependsOn: [test, publish, tagVersion, publishPlugins])
task unversionedJar(type: Jar, dependsOn: 'jar') {
version = null
from sourceSets.main.output
}
task installPlugin(type: Copy, dependsOn: 'unversionedJar') {
def gradleInstallDir = gradle.gradleHomeDir
group = 'installation'
description = 'Installs the plugin jar in your gradle distribution.'
from "${buildDir}/libs/${unversionedJar.archiveName}"
into "/${gradleInstallDir}/lib/plugins"
doLast {
println "Installed in: ${gradleInstallDir}/lib/plugins as: ${unversionedJar.archiveName}"
}
}
task uninstallPlugin(type: Delete) {
def gradleInstallDir = gradle.gradleHomeDir
group = 'installation'
description = 'Removes the plugin from your gradle distribution.'
delete("/${gradleInstallDir}/lib/plugins/${unversionedJar.archiveName}")
}
task copyJarfile(type: Copy) {
dependsOn jar
from(jar)
into("${project.buildDir}/gradleTest/repo/")
}
tasks.withType(Groovydoc).all { enabled = false }
gradleTest {
dependsOn copyJarfile
versions '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '2.8', '2.9'
versions '2.10', '2.11', '2.12', '2.13', '2.14.1'
versions '3.0', '3.1', '3.2.1', '3.3', '3.4.1', '3.5.1'
versions '4.0', '4.1', '4.2', '4.3.1', '4.4'
versions '4.5'
beforeTest {
println " ${it.name}"
}
}
jacocoTestReport {
reports {
xml.enabled true
}
}