-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruby.gradle
38 lines (35 loc) · 1.01 KB
/
ruby.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
envs {
bootstrapDirectory = new File(buildDir, 'bootstrap')
envsDirectory = new File(buildDir, 'envs')
//ruby "2.4.4", "rvm"
ruby "2.4.4", "rbenv"
}
task gemFile() {
dependsOn 'generateProto'
doLast {
new File("${protobuf.generatedFilesBaseDir}/main/ruby/${project.name}.gemspec").text = """
Gem::Specification.new do |s|
s.name = '${project.name}'
s.version = '$version'
s.date = '2010-04-28'
s.summary = "Hola!"
s.description = "A simple hello world gem"
s.authors = ["Nick Quaranto"]
s.email = '[email protected]'
s.files += Dir.glob("lib/**/*")
s.homepage =
'http://rubygems.org/gems/hola'
s.license = 'MIT'
s.required_ruby_version = '>= 2.4.0'
end
"""
}
}
task gem(type: Exec) {
dependsOn gemFile
dependsOn 'build_rubies'
workingDir "${protobuf.generatedFilesBaseDir}/main/ruby"
executable "${envs.rubies.head().dir}/bin/gem"
//executable '/usr/local/bin/gem'
args "build", "${project.name}.gemspec"
}