Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java 8 support #2889

Merged
merged 2 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,6 @@ jobs:

jruby-package:
needs: ["rcd_image_version"]
name: "jruby-package"
runs-on: ubuntu-latest
container:
image: "ghcr.io/rake-compiler/rake-compiler-dock-image:${{needs.rcd_image_version.outputs.rcd_image_version}}-jruby"
Expand All @@ -719,17 +718,19 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["jruby-9.4"]
jruby: ["9.4"]
jre: ["8", "11"]
name: "jruby-${{matrix.jruby}}-jre${{matrix.jre}}-install"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{matrix.ruby}}"
- uses: actions/download-artifact@v3
with:
name: jruby-gem
path: gems
- run: ./scripts/test-gem-install gems
- run: |
docker run --rm -v "$(pwd):/nokogiri" -w /nokogiri \
jruby:${{matrix.jruby}}-jre${{matrix.jre}} \
./scripts/test-gem-install gems
6 changes: 3 additions & 3 deletions lib/nokogiri/jruby/nokogiri_jars.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
require 'net/sourceforge/htmlunit/neko-htmlunit/2.63.0/neko-htmlunit-2.63.0.jar'
require 'nu/validator/jing/20200702VNU/jing-20200702VNU.jar'
require 'xerces/xercesImpl/2.12.2/xercesImpl-2.12.2.jar'
require 'org/nokogiri/nekodtd/0.1.11.noko1/nekodtd-0.1.11.noko1.jar'
require 'net/sf/saxon/Saxon-HE/9.6.0-4/Saxon-HE-9.6.0-4.jar'
require 'xalan/xalan/2.7.3/xalan-2.7.3.jar'
require 'xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar'
require 'org/nokogiri/nekodtd/0.1.11.noko2/nekodtd-0.1.11.noko2.jar'
require 'isorelax/isorelax/20030108/isorelax-20030108.jar'
end

Expand All @@ -18,10 +18,10 @@
require_jar 'net.sourceforge.htmlunit', 'neko-htmlunit', '2.63.0'
require_jar 'nu.validator', 'jing', '20200702VNU'
require_jar 'xerces', 'xercesImpl', '2.12.2'
require_jar 'org.nokogiri', 'nekodtd', '0.1.11.noko1'
require_jar 'net.sf.saxon', 'Saxon-HE', '9.6.0-4'
require_jar 'xalan', 'xalan', '2.7.3'
require_jar 'xml-apis', 'xml-apis', '1.4.01'
require_jar 'org.nokogiri', 'nekodtd', '0.1.11.noko2'
require_jar 'isorelax', 'isorelax', '20030108'
end

Expand All @@ -32,7 +32,7 @@ module Nokogiri
"net.sf.saxon:Saxon-HE" => "9.6.0-4",
"net.sourceforge.htmlunit:neko-htmlunit" => "2.63.0",
"nu.validator:jing" => "20200702VNU",
"org.nokogiri:nekodtd" => "0.1.11.noko1",
"org.nokogiri:nekodtd" => "0.1.11.noko2",
"xalan:serializer" => "2.7.3",
"xalan:xalan" => "2.7.3",
"xerces:xercesImpl" => "2.12.2",
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion nokogiri.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ Gem::Specification.new do |spec|

spec.require_paths << "lib/nokogiri/jruby" # where we install the jars, see the :vendor_jars rake task
spec.requirements << "jar isorelax, isorelax, 20030108" # https://search.maven.org/artifact/isorelax/isorelax
spec.requirements << "jar org.nokogiri, nekodtd, 0.1.11.noko1"
spec.requirements << "jar org.nokogiri, nekodtd, 0.1.11.noko2"
spec.requirements << "jar net.sourceforge.htmlunit, neko-htmlunit, 2.63.0"
spec.requirements << "jar nu.validator, jing, 20200702VNU" # https://search.maven.org/artifact/nu.validator/jing
spec.requirements << "jar xalan, serializer, 2.7.3" # https://search.maven.org/artifact/xalan/serializer
Expand Down
6 changes: 6 additions & 0 deletions rakelib/extensions.rake
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,12 @@ namespace "gem" do
end

if java?
# append to the existing "java" task defined by rake-compiler
task "java" do # rubocop:disable Rake/Desc
# if we're building the java gem, don't build the vanilla gem (see rakelib/package.rake)
Rake::Task["pkg/#{NOKOGIRI_SPEC.full_name}.gem"].clear
end

require "rake/javaextensiontask"
Rake::JavaExtensionTask.new("nokogiri", NOKOGIRI_SPEC.dup) do |ext|
# Keep the extension C files because they have docstrings (and Java files don't)
Expand Down