-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
105 lines (86 loc) · 2.79 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
group = rootProject.group
version = rootProject.version
configurations {
testRepo
testRepo2
}
repositories {
mavenLocal()
maven { url 'http://rubygems.lasagna.io/proxy/maven/releases' }
}
dependencies {
compile 'com.github.jruby-gradle:jruby-gradle-plugin:0.4.0'
testCompile ("org.spockframework:spock-core:0.7-groovy-${gradle.gradleVersion.startsWith('1.')?'1.8':'2.0'}") {
exclude module : 'groovy-all'
}
// For the testRepo tests I am locking the versions, instead of a open version, as it makes
// unit testing easier, This does not affect the final artifact.
// If you change values here, you need to update JRubyJarPluginSpec as well.
testRepo ("org.jruby:jruby-complete:1.7.21") {
transitive = false
}
testRepo2 ("org.jruby:jruby-complete:1.7.20") {
transitive = false
}
testRepo ('org.slf4j:slf4j-simple:1.7.7') {
transitive = true
}
testRepo ("io.dropwizard.metrics:metrics-healthchecks:3.1.0") {
transitive = false
}
testRepo ("io.dropwizard.metrics:metrics-jvm:3.1.0") {
transitive = true
}
}
ext {
testRepoDir = new File(buildDir,'tmp/test/repo' )
}
test {
doFirst {
copy {
from project.configurations.testRepo.files
into testRepoDir
}
copy {
from project.configurations.testRepo2.files
into testRepoDir
}
}
if(gradle.startParameter.isOffline()) {
systemProperties 'TESTS_ARE_OFFLINE' : '1'
}
systemProperties TESTROOT : new File(buildDir,'tmp/test/unittests').absolutePath
systemProperties TESTREPO_LOCATION : testRepoDir.absolutePath
systemProperties 'logback.configurationFile' : new File(projectDir,'src/test/resources/logback-test.xml').absolutePath
}
groovydoc {
docTitle = "${archivesBaseName} ${version}"
}
task installGroovyDoc (type : Copy) {
from ({new File(buildDir,'docs/groovydoc')}) {
include '**'
}
into {new File(project.properties.jrubyGradleWebsiteInstallDir,"docs/api/${archivesBaseName}/${version}")}
onlyIf { project.hasProperty('jrubyGradleWebsiteInstallDir') }
}
bintray {
user = project.bintrayUser
key = project.bintrayKey
publish = true
dryRun = false
configurations = ['archives']
pkg {
userOrg = 'jruby-gradle'
repo = 'plugins'
name = 'jruby-gradle-rspec-plugin'
labels = ['jruby']
version {
name = project.version
vcsTag = "v${project.version}"
attributes = ['gradle-plugin' : 'com.github.jruby-gradle.rspec:com.github.jruby-gradle:jruby-gradle-jar-plugin']
desc = 'This plugin encapsulates rspec gem functionality for JRuby Gradle projects'
}
}
}
bintrayUpload.dependsOn assemble
// vim: ft=groovy