diff --git a/Gemfile b/Gemfile index c437f69..29af0ac 100644 --- a/Gemfile +++ b/Gemfile @@ -2,10 +2,9 @@ source "https://rubygems.org" group :development do gem "rspec_junit_formatter" - gem "rdoc" - platforms :jruby do - gem "rbs", ">= 4.1.0.pre.2" # Use the java-platform gem so JRuby does not build the C extension + platforms :ruby do + gem "rdoc" end end diff --git a/Rakefile b/Rakefile index eb9984a..21f2ba3 100644 --- a/Rakefile +++ b/Rakefile @@ -21,12 +21,17 @@ end task default: :spec -require "rdoc/task" -Rake::RDocTask.new do |rdoc| - version = File.exist?("VERSION") ? File.read("VERSION") : "" +begin + require "rdoc/task" +rescue LoadError + # The Gemfile bundles rdoc only on platforms :ruby; skip the RDoc task without it +else + Rake::RDocTask.new do |rdoc| + version = File.exist?("VERSION") ? File.read("VERSION") : "" - rdoc.rdoc_dir = "doc" - rdoc.title = "ruby-plsql #{version}" - rdoc.rdoc_files.include("README*") - rdoc.rdoc_files.include("lib/**/*.rb") + rdoc.rdoc_dir = "doc" + rdoc.title = "ruby-plsql #{version}" + rdoc.rdoc_files.include("README*") + rdoc.rdoc_files.include("lib/**/*.rb") + end end