This repository was archived by the owner on May 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
117 lines (97 loc) · 3.01 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
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2"
classpath "org.ysb33r.gradle:gradletest:0.5.4"
}
}
apply plugin: 'codenarc'
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'com.jfrog.bintray'
apply from: 'gradle/integration-test.gradle'
group = 'com.github.jruby-gradle'
version = '0.4.4'
defaultTasks 'check', 'assemble'
// Any time we're not expicitly saying "build me a release build" we'll change
// the version to -SNAPSHOT
if (!(System.env.TRAVIS_TAG as Boolean)) {
version = "${version}-SNAPSHOT"
}
repositories {
jcenter()
}
dependencies {
compile new GradleDist(project, '2.0').asFileTree
['jruby-gradle-plugin', 'jruby-gradle-jar-plugin'].each { String plugin ->
String pluginDependency = "com.github.jruby-gradle:${plugin}:${jrubyGradleMinVersion}"
compile pluginDependency
gradleTest pluginDependency
}
testCompile ("org.spockframework:spock-core:0.7-groovy-${gradle.gradleVersion.startsWith('1.')?'1.8':'2.0'}") {
exclude module : 'groovy-all'
}
/* Used for mocking non interface types */
testCompile 'cglib:cglib-nodep:3.1'
}
plugins.withType(JavaPlugin) {
sourceCompatibility = 1.7
targetCompatibility = 1.7
project.tasks.withType(JavaCompile) { task ->
task.sourceCompatibility = project.sourceCompatibility
task.targetCompatibility = project.targetCompatibility
}
project.tasks.withType(GroovyCompile) { task ->
task.sourceCompatibility = project.sourceCompatibility
task.targetCompatibility = project.targetCompatibility
}
}
codenarc {
sourceSets = [sourceSets.main]
configFile = file('gradle/codenarc.xml')
}
test {
testLogging {
exceptionFormat "full"
events "passed", "skipped", "failed", "standardOut", "standardError"
}
}
task sourcesJar(type: Jar) {
classifier = 'sources'
dependsOn classes
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
bintray {
user = project.bintrayUser
key = project.bintrayKey
publish = true
configurations = ['archives']
/*
* Only only publish when we're tagging a release and if we've executed on
* the JDK7 build. This is to prevent multiple attempts by the build matrix
* to publish the artifacts
*/
dryRun = !((System.env.TRAVIS_TAG as boolean) && (System.env.TRAVIS_JDK_VERSION == 'openjdk7'))
pkg {
userOrg = 'jruby-gradle'
repo = 'plugins'
name = 'jruby-gradle-storm-plugin'
labels = ['jruby','storm','java']
version {
name = project.version
vcsTag = "v${project.version}"
attributes = ['gradle-plugin' : 'com.github.jruby-gradle.storm:com.github.jruby-gradle:jruby-gradle-storm-plugin']
desc = project.description
}
}
}
bintrayUpload.dependsOn assemble
// vim: ft=groovy