Skip to content

Commit 7e055e1

Browse files
committed
Getting ready for JRuby-9.3.1.0
1 parent 3edf1d9 commit 7e055e1

File tree

6 files changed

+20
-21
lines changed

6 files changed

+20
-21
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
**v2.6.0** Recommend JRuby-9.3.1.0 use, move non-java files to resources (simplifies path). Use `field` not `declared_field` to access java_class fields.
2+
13
**v2.5.1** Recommend JRuby-9.2.19.0 use.
24

35
**v2.5.0** Refactor noise to delegate pattern and make OpenSimplex2 noise default noise, implement pdf and svg export libraries.

lib/jruby_art/helper_methods.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,14 @@ def find_method(method_name)
123123
# some methods. Add to this list as needed.
124124
def proxy_java_fields
125125
fields = %w[key frameRate mousePressed keyPressed]
126-
methods = fields.map { |field| java_class.declared_field(field) }
127-
@declared_fields = Hash[fields.zip(methods)]
126+
methods = fields.map { |field| java_class.field(field) }
127+
@jfields = Hash[fields.zip(methods)]
128128
end
129129

130130
# Fix java conversion problems getting the last key
131131
# If it's ASCII, return the character, otherwise the integer
132132
def key
133-
int = @declared_fields['key'].value(java_self)
133+
int = @jfields['key'].value(java_self)
134134
int < 256 ? int.chr : int
135135
end
136136

@@ -167,19 +167,19 @@ def save_strings(filename, strings)
167167

168168
# frame_rate needs to support reading and writing
169169
def frame_rate(fps = nil)
170-
return @declared_fields['frameRate'].value(java_self) unless fps
170+
return @jfields['frameRate'].value(java_self) unless fps
171171

172172
super(fps)
173173
end
174174

175175
# Is the mouse pressed for this frame?
176176
def mouse_pressed?
177-
@declared_fields['mousePressed'].value(java_self)
177+
@jfields['mousePressed'].value(java_self)
178178
end
179179

180180
# Is a key pressed for this frame?
181181
def key_pressed?
182-
@declared_fields['keyPressed'].value(java_self)
182+
@jfields['keyPressed'].value(java_self)
183183
end
184184

185185
private

lib/jruby_art/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
# A wrapper for version
44
module JRubyArt
5-
VERSION = '2.5.1'
5+
VERSION = '2.6.0'
66
end

pom.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project 'jruby_art', 'https://github.com/ruby-processing/JRubyArt' do
22

33
model_version '4.0.0'
4-
id 'ruby-processing:jruby_art:2.5.1'
4+
id 'ruby-processing:jruby_art:2.6.0'
55
packaging 'jar'
66

77
description 'Jar for JRubyArt'
@@ -28,11 +28,12 @@
2828
'polyglot.dump.pom' => 'pom.xml',
2929
'project.build.sourceEncoding' => 'UTF-8',
3030
'jogl.version' => '2.3.2',
31+
'jruby.version' => '9.3.1.0',
3132
'itextpdf.version' => '5.5.13.2',
3233
'batik.version' => '1.14',
3334
'jruby.api' => 'http://jruby.org/apidocs/' )
3435

35-
pom 'org.jruby:jruby:9.2.19.0'
36+
jar 'org.jruby:jruby-base:${jruby.version}'
3637
jar 'org.jogamp.jogl:jogl-all:${jogl.version}'
3738
jar 'org.jogamp.gluegen:gluegen-rt-main:${jogl.version}'
3839
jar 'org.processing:video:3.0.2'
@@ -76,12 +77,11 @@
7677
build do
7778
resource do
7879
directory '${source.directory}/main/java'
79-
includes '**/**/*.glsl', '**/*.jnilib'
8080
excludes '**/**/*.java'
8181
end
8282
resource do
8383
directory '${source.directory}/main/resources'
84-
includes '**/*.png', '*.txt'
84+
includes '**/*.png', '**/*.txt', '**/*.glsl'
8585
end
8686
end
8787

pom.xml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DO NOT MODIFY - GENERATED CODE
1111
<modelVersion>4.0.0</modelVersion>
1212
<groupId>ruby-processing</groupId>
1313
<artifactId>jruby_art</artifactId>
14-
<version>2.5.1</version>
14+
<version>2.6.0</version>
1515
<name>jruby_art</name>
1616
<description>Jar for JRubyArt</description>
1717
<url>https://github.com/ruby-processing/JRubyArt</url>
@@ -66,6 +66,7 @@ DO NOT MODIFY - GENERATED CODE
6666
<itextpdf.version>5.5.13.2</itextpdf.version>
6767
<jogl.version>2.3.2</jogl.version>
6868
<jruby.api>http://jruby.org/apidocs/</jruby.api>
69+
<jruby.version>9.3.1.0</jruby.version>
6970
<jruby_art.basedir>${project.basedir}</jruby_art.basedir>
7071
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
7172
<processing.api>http://processing.github.io/processing-javadocs/core/</processing.api>
@@ -75,9 +76,8 @@ DO NOT MODIFY - GENERATED CODE
7576
<dependencies>
7677
<dependency>
7778
<groupId>org.jruby</groupId>
78-
<artifactId>jruby</artifactId>
79-
<version>9.2.19.0</version>
80-
<type>pom</type>
79+
<artifactId>jruby-base</artifactId>
80+
<version>${jruby.version}</version>
8181
</dependency>
8282
<dependency>
8383
<groupId>org.jogamp.jogl</groupId>
@@ -109,10 +109,6 @@ DO NOT MODIFY - GENERATED CODE
109109
<resources>
110110
<resource>
111111
<directory>${source.directory}/main/java</directory>
112-
<includes>
113-
<include>**/**/*.glsl</include>
114-
<include>**/*.jnilib</include>
115-
</includes>
116112
<excludes>
117113
<exclude>**/**/*.java</exclude>
118114
</excludes>
@@ -121,7 +117,8 @@ DO NOT MODIFY - GENERATED CODE
121117
<directory>${source.directory}/main/resources</directory>
122118
<includes>
123119
<include>**/*.png</include>
124-
<include>*.txt</include>
120+
<include>**/*.txt</include>
121+
<include>**/*.glsl</include>
125122
</includes>
126123
</resource>
127124
</resources>

vendors/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ WARNING = <<~WARN
1111
1212
WARN
1313
# https://github.com/processing/processing-video/releases/download/r6-v2.0-beta4/video-2.0-beta4.zip
14-
JRUBYC_VERSION = '9.2.19.0'
14+
JRUBYC_VERSION = '9.3.1.0'
1515
SOUND = 'sound.zip'
1616
SOUND_VERSION = 'v2.2.3'
1717
VIDEO = 'video.zip'

0 commit comments

Comments
 (0)