propane 3.8.0-java → 4.0.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/.mvn/extensions.xml +1 -1
  3. data/.mvn/wrapper/maven-wrapper.properties +1 -1
  4. data/.travis.yml +1 -1
  5. data/CHANGELOG.md +7 -1
  6. data/README.md +7 -7
  7. data/Rakefile +6 -5
  8. data/lib/propane/app.rb +10 -17
  9. data/lib/propane/helper_methods.rb +6 -6
  10. data/lib/propane/version.rb +1 -1
  11. data/lib/propane-4.0.0.jar +0 -0
  12. data/library/pdf/itextpdf-5.5.13.2.jar +0 -0
  13. data/library/pdf/pdf.rb +7 -0
  14. data/library/slider/slider.rb +1 -1
  15. data/library/svg/batik-all-1.14.jar +0 -0
  16. data/library/svg/svg.rb +7 -0
  17. data/mvnw +3 -3
  18. data/mvnw.cmd +2 -2
  19. data/pom.rb +35 -8
  20. data/pom.xml +60 -9
  21. data/propane.gemspec +9 -7
  22. data/src/main/java/monkstone/ColorUtil.java +1 -1
  23. data/src/main/java/monkstone/FastNoiseModuleJava.java +127 -0
  24. data/src/main/java/monkstone/MathToolModule.java +31 -31
  25. data/src/main/java/monkstone/PropaneLibrary.java +3 -1
  26. data/src/main/java/monkstone/SmoothNoiseModuleJava.java +127 -0
  27. data/src/main/java/monkstone/fastmath/DegLutTables.java +25 -26
  28. data/src/main/java/monkstone/fastmath/Deglut.java +1 -1
  29. data/src/main/java/monkstone/filechooser/Chooser.java +2 -2
  30. data/src/main/java/monkstone/noise/LICENSE +121 -0
  31. data/src/main/java/monkstone/noise/OpenSimplex2F.java +914 -0
  32. data/src/main/java/monkstone/noise/OpenSimplex2S.java +1138 -0
  33. data/src/main/java/monkstone/slider/CustomHorizontalSlider.java +1 -1
  34. data/src/main/java/monkstone/slider/CustomVerticalSlider.java +1 -1
  35. data/src/main/java/monkstone/slider/SimpleHorizontalSlider.java +1 -1
  36. data/src/main/java/monkstone/slider/SimpleVerticalSlider.java +1 -1
  37. data/src/main/java/monkstone/slider/SliderBar.java +1 -1
  38. data/src/main/java/monkstone/slider/SliderGroup.java +1 -1
  39. data/src/main/java/monkstone/slider/WheelHandler.java +2 -2
  40. data/src/main/java/monkstone/vecmath/JRender.java +6 -6
  41. data/src/main/java/monkstone/vecmath/package-info.java +1 -1
  42. data/src/main/java/monkstone/vecmath/vec2/Vec2.java +103 -83
  43. data/src/main/java/monkstone/vecmath/vec3/Vec3.java +27 -41
  44. data/src/main/java/monkstone/videoevent/CaptureEvent.java +1 -1
  45. data/src/main/java/monkstone/videoevent/MovieEvent.java +1 -1
  46. data/src/main/java/monkstone/videoevent/package-info.java +1 -1
  47. data/src/main/java/processing/awt/PGraphicsJava2D.java +11 -4
  48. data/src/main/java/processing/awt/PImageAWT.java +8 -8
  49. data/src/main/java/processing/core/PApplet.java +245 -254
  50. data/src/main/java/processing/core/PConstants.java +155 -163
  51. data/src/main/java/processing/core/PGraphics.java +116 -109
  52. data/src/main/java/processing/core/PImage.java +3025 -3047
  53. data/src/main/java/processing/core/PMatrix.java +5 -2
  54. data/src/main/java/processing/data/DoubleDict.java +72 -43
  55. data/src/main/java/processing/data/DoubleList.java +6 -2
  56. data/src/main/java/processing/data/FloatDict.java +744 -756
  57. data/src/main/java/processing/data/FloatList.java +68 -26
  58. data/src/main/java/processing/data/IntDict.java +72 -45
  59. data/src/main/java/processing/data/IntList.java +63 -26
  60. data/src/main/java/processing/data/JSONArray.java +892 -931
  61. data/src/main/java/processing/data/JSONObject.java +1169 -1262
  62. data/src/main/java/processing/data/JSONTokener.java +30 -49
  63. data/src/main/java/processing/data/LongDict.java +699 -712
  64. data/src/main/java/processing/data/LongList.java +676 -700
  65. data/src/main/java/processing/data/Sort.java +1 -0
  66. data/src/main/java/processing/data/Table.java +4040 -3661
  67. data/src/main/java/processing/data/TableRow.java +16 -0
  68. data/src/main/java/processing/data/XML.java +1041 -956
  69. data/src/main/java/processing/event/TouchEvent.java +1 -1
  70. data/src/main/java/processing/opengl/FontTexture.java +2 -2
  71. data/src/main/java/processing/opengl/PGraphicsOpenGL.java +28 -31
  72. data/src/main/java/processing/opengl/PJOGL.java +8 -7
  73. data/src/main/java/processing/opengl/PShader.java +1 -6
  74. data/src/main/java/processing/opengl/PShapeOpenGL.java +23 -24
  75. data/src/main/java/processing/opengl/PSurfaceJOGL.java +6 -6
  76. data/src/main/java/processing/pdf/PGraphicsPDF.java +581 -0
  77. data/src/main/java/processing/svg/PGraphicsSVG.java +378 -0
  78. data/src/main/{java/processing/opengl → resources}/cursors/arrow.png +0 -0
  79. data/src/main/{java/processing/opengl → resources}/cursors/cross.png +0 -0
  80. data/src/main/{java/processing/opengl → resources}/cursors/hand.png +0 -0
  81. data/src/main/{java/processing/opengl → resources}/cursors/license.txt +0 -0
  82. data/src/main/{java/processing/opengl → resources}/cursors/move.png +0 -0
  83. data/src/main/{java/processing/opengl → resources}/cursors/text.png +0 -0
  84. data/src/main/{java/processing/opengl → resources}/cursors/wait.png +0 -0
  85. data/src/main/{java/processing/opengl → resources}/shaders/ColorFrag.glsl +0 -0
  86. data/src/main/{java/processing/opengl → resources}/shaders/ColorVert.glsl +0 -0
  87. data/src/main/{java/processing/opengl → resources}/shaders/LightFrag.glsl +0 -0
  88. data/src/main/{java/processing/opengl → resources}/shaders/LightVert.glsl +0 -0
  89. data/src/main/{java/processing/opengl → resources}/shaders/LineFrag.glsl +0 -0
  90. data/src/main/{java/processing/opengl → resources}/shaders/LineVert.glsl +0 -0
  91. data/src/main/{java/processing/opengl → resources}/shaders/MaskFrag.glsl +0 -0
  92. data/src/main/{java/processing/opengl → resources}/shaders/PointFrag.glsl +0 -0
  93. data/src/main/{java/processing/opengl → resources}/shaders/PointVert.glsl +0 -0
  94. data/src/main/{java/processing/opengl → resources}/shaders/TexFrag.glsl +0 -0
  95. data/src/main/{java/processing/opengl → resources}/shaders/TexLightFrag.glsl +0 -0
  96. data/src/main/{java/processing/opengl → resources}/shaders/TexLightVert.glsl +0 -0
  97. data/src/main/{java/processing/opengl → resources}/shaders/TexVert.glsl +0 -0
  98. data/test/test_helper.rb +1 -0
  99. data/test/vecmath_spec_test.rb +14 -3
  100. data/vendors/Rakefile +1 -1
  101. metadata +53 -53
  102. data/lib/propane-3.8.0.jar +0 -0
  103. data/src/main/java/monkstone/noise/Noise.java +0 -116
  104. data/src/main/java/monkstone/noise/NoiseGenerator.java +0 -63
  105. data/src/main/java/monkstone/noise/NoiseMode.java +0 -15
  106. data/src/main/java/monkstone/noise/SimplexNoise.java +0 -470
  107. data/src/main/java/monkstone/noise/ValueNoise.java +0 -170
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5df47b4eba645e3b5de5e4c6bbcd5af6c2955cc2e34c326fcb712b967d272c2e
4
- data.tar.gz: fd791b044c4780f082aa2f6660a7818266603fd6fdcbb6463c8af6c42e34a41d
3
+ metadata.gz: ed3ade00bcc8f690667cef5813b3f2313bbb172ee6c5e8f2fd596cd3e350c24f
4
+ data.tar.gz: ed0dd5d31432a47dd33e982de5f0243e89183832dd234778971825ccde0df624
5
5
  SHA512:
6
- metadata.gz: 49bab01156deeea38dc4710486fa371dc93a0b0056f7e93d5110fc2343f4477093fcbd2cc50cc7d3153668916d80ed1dff74a0e3fdcce652784d0d6d8d99c90a
7
- data.tar.gz: 752c53bb1719652fc1b11514add89b0dff33b2dba23b72ed44db0c58a3d86b99373d1f69f7d928c12e829fb4d1b942da89805d3d4dc3c427bcc36477d60abd75
6
+ metadata.gz: ddaaa9ea1c8fcfc60289e39de72f74df4e64285af3d6ee95f92c90d8eafc1f8f56715d40cf8f0ce92aa1e92cc2b69ec58eb06f9e884992c834e23468173bff96
7
+ data.tar.gz: f88e992e3f544e44da3f0d49387f16853912fafa2cb3285a790db360353c53fdfe33250baeac2a142875a086e93ac5ca065ddec08c6fa73585610900036a55d4
data/.mvn/extensions.xml CHANGED
@@ -3,6 +3,6 @@
3
3
  <extension>
4
4
  <groupId>io.takari.polyglot</groupId>
5
5
  <artifactId>polyglot-ruby</artifactId>
6
- <version>0.4.6</version>
6
+ <version>0.4.8</version>
7
7
  </extension>
8
8
  </extensions>
@@ -1,2 +1,2 @@
1
- distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
1
+ distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip
2
2
  wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
data/.travis.yml CHANGED
@@ -2,7 +2,7 @@ language: java
2
2
  dist: bionic
3
3
 
4
4
  rvm:
5
- - jruby-9.2.12.0
5
+ - jruby-9.2.17.0
6
6
  jdk:
7
7
  - openjdk11
8
8
  os:
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
+ **v4.0.0** Requires use of jdk17 update to min JRuby-3.2.0.0, deprecates cross product for Vec2D in favor of wedge product.
2
+
3
+ **v3.11.0** Suggest use of JRuby-9.3.1.0+, some refactoring of GfxRender and ShapeRender. Change `declared_field` to field possible since JRuby-9.3.0.0, required since JRuby-9.3.1.0
4
+
5
+ **v3.10.0** Default to using FastNoise module, with alternative of SmoothNoise module.
6
+
1
7
  **v3.8.0** Refactor noise to delegate pattern, improve default implementation and add simplex noise option
2
8
 
3
- **v3.7.1** Recommend JRuby-9.2.15.0 use
9
+ **v3.7.1** Recommend JRuby-9.2.16.0 use
4
10
 
5
11
  **v3.5.0** Rebase processing core code around Sam Pottingers latest fixes for JOGL an image save, does mean breaking some of Diwis and Joshua Davis examples, but one hopes codeanticode knows what he's doing.
6
12
 
data/README.md CHANGED
@@ -1,17 +1,17 @@
1
1
  # Propane [![Gem Version](https://badge.fury.io/rb/propane.svg)](https://badge.fury.io/rb/propane) ![Travis CI](https://travis-ci.org/ruby-processing/propane.svg)
2
2
 
3
- This version is intended to work with openjdk11+, @sampottinger is currently working on [vanilla processing][vanilla] which will enable JRubyArt to catch up.
3
+ This version is intended to work with openjdk11+.
4
4
 
5
- A slim layer to communicate with Processing from JRuby, features maven build. We have created a configuration free version of ruby processing, for processing-4.0+, where we include a modified processing core (`public runPropane()` to replace `protected runSketch()`. These jars are small enough to include in a gem distribution, and hence we do not require configuration. This has created a scriptable version, ie files get run direct from jruby. Currently JavaFX is unsupported again @sampottinger is currently working on [vanilla processing][vanilla] to use OpenJFX. It would be nice make use of java modules, but I think we should let jruby project do that first (unless processing.org beat them to it).
5
+ A slim layer to communicate with Processing from JRuby, features maven build. We have created a configuration free version of ruby processing, for processing-4.0+, where we include a modified processing core (`public runPropane()` to replace `protected runSketch()`. These jars are small enough to include in a gem distribution, and hence we do not require configuration. This has created a scriptable version, ie files get run direct from jruby. Currently JavaFX is unsupported. Using maven to create an automatic module, to be refined.
6
6
 
7
7
  adjust above for your OS/distro setup.
8
8
 
9
9
  ## Requirements
10
10
 
11
- Previously there has been linker issue with P2D or P3D sketches with stock openjdk with some linux distros, but that seems to have gone away. [Adopt open jdk binaries][adopt] have always worked.
11
+ Tested with OpenJDK17.
12
12
 
13
- - `jdk-11.0.7+`
14
- - `jruby-9.2.16.0`
13
+ - `jdk-17.01+`
14
+ - `jruby-9.3.2.0`
15
15
 
16
16
  ## Building and testing
17
17
 
@@ -25,10 +25,10 @@ rake javadoc
25
25
 
26
26
  ```bash
27
27
  jgem install propane # from rubygems
28
- jgem install propane-3.8.0-java.gem # local install
28
+ jgem install propane-4.0.0-java.gem # local install
29
29
  # Alternative
30
30
  jruby -S gem install propane # from rubygems
31
- jruby -S gem install propane-3.8.0-java.gem # local install
31
+ jruby -S gem install propane-4.0.0-java.gem # local install
32
32
  ```
33
33
 
34
34
  ## Check Install
data/Rakefile CHANGED
@@ -17,7 +17,8 @@ end
17
17
 
18
18
  desc 'Install'
19
19
  task :install do
20
- sh "mv target/propane-#{Propane::VERSION}.jar lib"
20
+ sh './mvnw dependency:copy'
21
+ FileUtils.mv("target/propane-#{Propane::VERSION}.jar", 'lib')
21
22
  end
22
23
 
23
24
  desc 'Gem'
@@ -35,9 +36,9 @@ task :compile do
35
36
  sh './mvnw package'
36
37
  end
37
38
 
38
- desc 'JRuby-Complete'
39
- task :install_complete do
40
- sh 'cd vendors && rake'
39
+ desc 'pmd'
40
+ task :pmd do
41
+ sh './mvnw pmd:pmd'
41
42
  end
42
43
 
43
44
  desc 'Test'
@@ -53,7 +54,7 @@ end
53
54
  desc 'clean'
54
55
  task :clean do
55
56
  Dir['./**/*.{jar,gem}'].each do |path|
56
- puts "Deleting #{path} ..."
57
+ puts 'Deleting #{path} ...'
57
58
  File.delete(path)
58
59
  end
59
60
  FileUtils.rm_rf('./target')
data/lib/propane/app.rb CHANGED
@@ -11,13 +11,12 @@ module Propane
11
11
  Java::Monkstone::PropaneLibrary.load(JRuby.runtime)
12
12
  SKETCH_ROOT = File.absolute_path('.')
13
13
  # import custom Vecmath renderers
14
- module Render
15
- java_import 'monkstone.vecmath.GfxRender'
16
- java_import 'monkstone.vecmath.ShapeRender'
17
- end
14
+ import 'monkstone.vecmath.GfxRender'
15
+ import 'monkstone.vecmath.ShapeRender'
18
16
 
19
- VALUE = Java::MonkstoneNoise::NoiseMode::PERLIN
20
- SIMPLEX = Java::MonkstoneNoise::NoiseMode::SIMPLEX
17
+ # module NoiseModule
18
+ # java_import 'monkstone.noise.NoiseMode'
19
+ # end
21
20
 
22
21
  # This class is the base class the user should inherit from when making
23
22
  # their own sketch.
@@ -57,7 +56,7 @@ module Propane
57
56
  include HelperMethods
58
57
  include Math
59
58
  include MathTool
60
- include Render
59
+ include FastNoise
61
60
  # Alias some methods for familiarity for Shoes coders.
62
61
  alias oval ellipse
63
62
  alias stroke_width stroke_weight
@@ -117,7 +116,7 @@ module Propane
117
116
 
118
117
  def initialize(options = {}, arguments = [])
119
118
  # Guard against invalid input.
120
- proxy_java_fields
119
+ proxy_java_fields # see helper_methods
121
120
  raise TypeError unless options.is_a? Hash
122
121
  raise TypeError unless arguments.is_a? Array
123
122
 
@@ -156,19 +155,13 @@ module Propane
156
155
 
157
156
  def import_opengl
158
157
  # Include processing opengl classes that we'd like to use:
159
- %w[FontTexture FrameBuffer LinePath LineStroker PGL
160
- PGraphics2D PGraphics3D PGraphicsOpenGL PShader
161
- PShapeOpenGL Texture].each do |klass|
158
+ %w[FontTexture FrameBuffer LinePath LineStroker PGL PGraphics2D
159
+ PGraphics3D PGraphicsOpenGL PJOGL PShader PSurfaceJOGL
160
+ VertexBuffer PShapeOpenGL Texture].each do |klass|
162
161
  java_import "processing.opengl.#{klass}"
163
162
  end
164
163
  end
165
164
 
166
- def proxy_java_fields
167
- fields = %w[sketchPath key frameRate mousePressed keyPressed]
168
- methods = fields.map { |field| java_class.declared_field(field) }
169
- @declared_fields = Hash[fields.zip(methods)]
170
- end
171
-
172
165
  # When certain special methods get added to the sketch, we need to let
173
166
  # Processing call them by their expected Java names.
174
167
  def method_added(method_name) #:nodoc:
@@ -116,14 +116,14 @@ module Propane
116
116
  # some methods. Add to this list as needed.
117
117
  def proxy_java_fields
118
118
  fields = %w[key frameRate mousePressed keyPressed]
119
- methods = fields.map { |field| java_class.declared_field(field) }
120
- @declared_fields = Hash[fields.zip(methods)]
119
+ methods = fields.map { |field| java_class.field(field) }
120
+ @jfields = Hash[fields.zip(methods)]
121
121
  end
122
122
 
123
123
  # Fix java conversion problems getting the last key
124
124
  # If it's ASCII, return the character, otherwise the integer
125
125
  def key
126
- int = @declared_fields['key'].value(java_self)
126
+ int = @jfields['key'].value(java_self)
127
127
  int < 256 ? int.chr : int
128
128
  end
129
129
 
@@ -160,19 +160,19 @@ module Propane
160
160
 
161
161
  # frame_rate needs to support reading and writing
162
162
  def frame_rate(fps = nil)
163
- return @declared_fields['frameRate'].value(java_self) unless fps
163
+ return @jfields['frameRate'].value(java_self) unless fps
164
164
 
165
165
  super(fps)
166
166
  end
167
167
 
168
168
  # Is the mouse pressed for this frame?
169
169
  def mouse_pressed?
170
- @declared_fields['mousePressed'].value(java_self)
170
+ @jfields['mousePressed'].value(java_self)
171
171
  end
172
172
 
173
173
  # Is a key pressed for this frame?
174
174
  def key_pressed?
175
- @declared_fields['keyPressed'].value(java_self)
175
+ @jfields['keyPressed'].value(java_self)
176
176
  end
177
177
 
178
178
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Propane
4
- VERSION = '3.8.0'
4
+ VERSION = '4.0.0'
5
5
  end
Binary file
Binary file
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # @TODO usage
4
+ class Propane::App
5
+ require_relative 'itextpdf-5.5.13.2.jar'
6
+ java_import Java::ProcessingPdf::PGraphicsPDF
7
+ end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Here's a little library for quickly hooking up in sketch sliders.
4
- # Copyright (c) 2015-20 Martin Prout.
4
+ # Copyright (c) 2015-22 Martin Prout.
5
5
 
6
6
  java_import 'monkstone.slider.CustomHorizontalSlider'
7
7
  java_import 'monkstone.slider.CustomVerticalSlider'
Binary file
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # @TODO usage
4
+ class Propane::App
5
+ require_relative 'batik-all-1.14.jar'
6
+ java_import Java::ProcessingSvg::PGraphicsSVG
7
+ end
data/mvnw CHANGED
@@ -212,9 +212,9 @@ else
212
212
  echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
213
213
  fi
214
214
  if [ -n "$MVNW_REPOURL" ]; then
215
- jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
215
+ jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
216
216
  else
217
- jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
217
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
218
218
  fi
219
219
  while IFS="=" read key value; do
220
220
  case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
@@ -246,7 +246,7 @@ else
246
246
  else
247
247
  curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
248
248
  fi
249
-
249
+
250
250
  else
251
251
  if [ "$MVNW_VERBOSE" = true ]; then
252
252
  echo "Falling back to using Java to download"
data/mvnw.cmd CHANGED
@@ -120,7 +120,7 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
120
120
  set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
121
121
  set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
122
122
 
123
- set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
123
+ set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
124
124
 
125
125
  FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
126
126
  IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
@@ -134,7 +134,7 @@ if exist %WRAPPER_JAR% (
134
134
  )
135
135
  ) else (
136
136
  if not "%MVNW_REPOURL%" == "" (
137
- SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
137
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
138
138
  )
139
139
  if "%MVNW_VERBOSE%" == "true" (
140
140
  echo Couldn't find %WRAPPER_JAR%, downloading it ...
data/pom.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  project 'propane', 'https://github.com/monkstone/propane' do
4
4
  model_version '4.0.0'
5
- id 'propane:propane:3.8.0'
5
+ id 'propane:propane:4.0.0'
6
6
  packaging 'jar'
7
7
 
8
8
  description 'An integrated processing-core (somewhat hacked), with additional java code for a jruby version of processing.'
@@ -44,19 +44,43 @@ project 'propane', 'https://github.com/monkstone/propane' do
44
44
  'polyglot.dump.pom' => 'pom.xml',
45
45
  'project.build.sourceEncoding' => 'utf-8',
46
46
  'jogl.version' => '2.3.2', # for compiling actual included 2.4.0-rc
47
+ 'jruby.version' => '9.3.2.0',
48
+ 'batik.version' => '1.14',
49
+ 'itextpdf.version' => '5.5.13.2',
47
50
  'jruby.api' => 'http://jruby.org/apidocs/')
48
51
 
49
- pom 'org.jruby:jruby:9.2.16.0'
52
+ jar 'org.jruby:jruby-base:${jruby.version}'
53
+ jar 'org.apache.xmlgraphics:batik-all:${batik.version}'
54
+ jar 'com.itextpdf:itextpdf:${itextpdf.version}'
50
55
  jar 'org.processing:video:3.3.7' # only for compiling
51
56
  jar 'org.jogamp.jogl:jogl-all:${jogl.version}'
52
57
  jar 'org.jogamp.gluegen:gluegen-rt-main:${jogl.version}'
53
58
 
54
59
  overrides do
55
- plugin('org.codehaus.mojo:versions-maven-plugin:2.7',
60
+
61
+ plugin('org.codehaus.mojo:versions-maven-plugin:2.8.1',
56
62
  'generateBackupPoms' => 'false')
57
63
  plugin(:compiler, '3.8.1',
58
- 'release' => '11')
59
- plugin(:javadoc, '3.2.0',
64
+ 'release' => '17')
65
+ plugin :dependency, '3.2.0' do
66
+ execute_goals( id: 'default-cli',
67
+ artifactItems:[
68
+ { groupId: 'com.itextpdf',
69
+ artifactId: 'itextpdf',
70
+ version: '${itextpdf.version}',
71
+ type: 'jar',
72
+ outputDirectory: '${propane.basedir}/library/pdf'
73
+ },
74
+ { groupId: 'org.apache.xmlgraphics',
75
+ artifactId: 'batik-all',
76
+ version: '${batik.version}',
77
+ type: 'jar',
78
+ outputDirectory: '${propane.basedir}/library/svg'
79
+ }
80
+ ]
81
+ )
82
+ end
83
+ plugin(:javadoc, '3.3.1',
60
84
  'detectOfflineLinks' => 'false',
61
85
  'links' => ['${jruby.api}',
62
86
  '${processing.api}'])
@@ -66,17 +90,20 @@ project 'propane', 'https://github.com/monkstone/propane' do
66
90
  'Automatic-Module-Name' => 'processing.core'
67
91
  }
68
92
  })
93
+ plugin('org.apache.maven.plugins:maven-pmd-plugin:3.15.0')
69
94
  end
70
95
  build do
71
96
  resource do
72
97
  directory '${source.directory}/main/java'
73
- includes '**/**/*.glsl', '**/*.jnilib'
98
+ includes '**/*.jnilib'
74
99
  excludes '**/**/*.java'
75
100
  end
76
101
  resource do
77
102
  directory '${source.directory}/main/resources'
78
- includes '**/*.png', '*.txt'
79
- excludes
103
+ includes '**/*.png', '**/*.glsl', '**/*.txt'
80
104
  end
81
105
  end
82
106
  end
107
+ reporting do
108
+ plugin('org.apache.maven.plugins:maven-jxr-plugin:3.1.1')
109
+ end
data/pom.xml CHANGED
@@ -11,7 +11,7 @@ DO NOT MODIFY - GENERATED CODE
11
11
  <modelVersion>4.0.0</modelVersion>
12
12
  <groupId>propane</groupId>
13
13
  <artifactId>propane</artifactId>
14
- <version>3.8.0</version>
14
+ <version>4.0.0</version>
15
15
  <name>propane</name>
16
16
  <description>An integrated processing-core (somewhat hacked), with additional java code for a jruby version of processing.</description>
17
17
  <url>https://github.com/monkstone/propane</url>
@@ -62,8 +62,11 @@ DO NOT MODIFY - GENERATED CODE
62
62
  <url>https://github.com/ruby-processing/propane/issues</url>
63
63
  </issueManagement>
64
64
  <properties>
65
+ <batik.version>1.14</batik.version>
66
+ <itextpdf.version>5.5.13.2</itextpdf.version>
65
67
  <jogl.version>2.3.2</jogl.version>
66
68
  <jruby.api>http://jruby.org/apidocs/</jruby.api>
69
+ <jruby.version>9.3.2.0</jruby.version>
67
70
  <polyglot.dump.pom>pom.xml</polyglot.dump.pom>
68
71
  <processing.api>http://processing.github.io/processing-javadocs/core/</processing.api>
69
72
  <project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
@@ -73,9 +76,18 @@ DO NOT MODIFY - GENERATED CODE
73
76
  <dependencies>
74
77
  <dependency>
75
78
  <groupId>org.jruby</groupId>
76
- <artifactId>jruby</artifactId>
77
- <version>9.2.16.0</version>
78
- <type>pom</type>
79
+ <artifactId>jruby-base</artifactId>
80
+ <version>${jruby.version}</version>
81
+ </dependency>
82
+ <dependency>
83
+ <groupId>org.apache.xmlgraphics</groupId>
84
+ <artifactId>batik-all</artifactId>
85
+ <version>${batik.version}</version>
86
+ </dependency>
87
+ <dependency>
88
+ <groupId>com.itextpdf</groupId>
89
+ <artifactId>itextpdf</artifactId>
90
+ <version>${itextpdf.version}</version>
79
91
  </dependency>
80
92
  <dependency>
81
93
  <groupId>org.processing</groupId>
@@ -98,7 +110,6 @@ DO NOT MODIFY - GENERATED CODE
98
110
  <resource>
99
111
  <directory>${source.directory}/main/java</directory>
100
112
  <includes>
101
- <include>**/**/*.glsl</include>
102
113
  <include>**/*.jnilib</include>
103
114
  </includes>
104
115
  <excludes>
@@ -109,7 +120,8 @@ DO NOT MODIFY - GENERATED CODE
109
120
  <directory>${source.directory}/main/resources</directory>
110
121
  <includes>
111
122
  <include>**/*.png</include>
112
- <include>*.txt</include>
123
+ <include>**/*.glsl</include>
124
+ <include>**/*.txt</include>
113
125
  </includes>
114
126
  </resource>
115
127
  </resources>
@@ -118,7 +130,7 @@ DO NOT MODIFY - GENERATED CODE
118
130
  <plugin>
119
131
  <groupId>org.codehaus.mojo</groupId>
120
132
  <artifactId>versions-maven-plugin</artifactId>
121
- <version>2.7</version>
133
+ <version>2.8.1</version>
122
134
  <configuration>
123
135
  <generateBackupPoms>false</generateBackupPoms>
124
136
  </configuration>
@@ -127,12 +139,39 @@ DO NOT MODIFY - GENERATED CODE
127
139
  <artifactId>maven-compiler-plugin</artifactId>
128
140
  <version>3.8.1</version>
129
141
  <configuration>
130
- <release>11</release>
142
+ <release>17</release>
131
143
  </configuration>
132
144
  </plugin>
133
145
  <plugin>
134
- <artifactId>maven-javadoc-plugin</artifactId>
146
+ <artifactId>maven-dependency-plugin</artifactId>
135
147
  <version>3.2.0</version>
148
+ <executions>
149
+ <execution>
150
+ <id>default-cli</id>
151
+ <configuration>
152
+ <artifactItems>
153
+ <artifactItem>
154
+ <groupId>com.itextpdf</groupId>
155
+ <artifactId>itextpdf</artifactId>
156
+ <version>${itextpdf.version}</version>
157
+ <type>jar</type>
158
+ <outputDirectory>${propane.basedir}/library/pdf</outputDirectory>
159
+ </artifactItem>
160
+ <artifactItem>
161
+ <groupId>org.apache.xmlgraphics</groupId>
162
+ <artifactId>batik-all</artifactId>
163
+ <version>${batik.version}</version>
164
+ <type>jar</type>
165
+ <outputDirectory>${propane.basedir}/library/svg</outputDirectory>
166
+ </artifactItem>
167
+ </artifactItems>
168
+ </configuration>
169
+ </execution>
170
+ </executions>
171
+ </plugin>
172
+ <plugin>
173
+ <artifactId>maven-javadoc-plugin</artifactId>
174
+ <version>3.3.1</version>
136
175
  <configuration>
137
176
  <detectOfflineLinks>false</detectOfflineLinks>
138
177
  <links>
@@ -152,7 +191,19 @@ DO NOT MODIFY - GENERATED CODE
152
191
  </archive>
153
192
  </configuration>
154
193
  </plugin>
194
+ <plugin>
195
+ <artifactId>maven-pmd-plugin</artifactId>
196
+ <version>3.15.0</version>
197
+ </plugin>
155
198
  </plugins>
156
199
  </pluginManagement>
157
200
  </build>
201
+ <reporting>
202
+ <plugins>
203
+ <plugin>
204
+ <artifactId>maven-jxr-plugin</artifactId>
205
+ <version>3.1.1</version>
206
+ </plugin>
207
+ </plugins>
208
+ </reporting>
158
209
  </project>
data/propane.gemspec CHANGED
@@ -11,9 +11,9 @@ Gem::Specification.new do |gem|
11
11
  gem.email = ['mamba2928@yahoo.co.uk']
12
12
  gem.licenses = %w[GPL-3.0 LGPL-2.0]
13
13
  gem.description = <<-EOS
14
- A batteries included version of processing in ruby targetting jdk11.
14
+ A batteries included version of processing in ruby targetting jdk11+.
15
15
  EOS
16
- gem.summary = 'ruby implementation of processing-4.0 on MacOS, linux and windows (64bit only)'
16
+ gem.summary = 'ruby implementation of processing-4.0 on linux and windows (64bit only), might work MacOS, needs testing'
17
17
  gem.homepage = 'https://ruby-processing.github.io/propane/'
18
18
  gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
19
19
  gem.files << "lib/propane-#{Propane::VERSION}.jar"
@@ -27,13 +27,15 @@ Gem::Specification.new do |gem|
27
27
  gem.files << 'lib/jogl-all-natives-macosx-universal.jar'
28
28
  # gem.files << 'lib/jogl-all-natives-ios-arm64.jar'
29
29
  gem.files << 'lib/jogl-all-natives-windows-amd64.jar'
30
+ gem.files << 'library/pdf/itextpdf-5.5.13.2.jar'
31
+ gem.files << 'library/svg/batik-all-1.14.jar'
30
32
  gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
31
33
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
32
- gem.add_development_dependency 'jruby-openssl', '~> 0.1.0', '>=0.1.3'
33
- gem.add_development_dependency 'minitest', '~> 5.14'
34
- gem.add_runtime_dependency 'rake', '~> 12.3'
35
- gem.add_runtime_dependency 'arcball', '~> 1.0', '>= 1.0.2'
34
+ gem.add_development_dependency 'jruby-openssl', '~> 0.10', '>=0.10.7'
35
+ gem.add_development_dependency 'minitest', '~> 5.15'
36
+ gem.add_runtime_dependency 'rake', '~> 13.0'
37
+ gem.add_runtime_dependency 'arcball', '~> 1.2'
36
38
  gem.require_paths = ['lib']
37
39
  gem.platform = 'java'
38
- gem.requirements << 'java runtime >= 11.0.2+'
40
+ gem.requirements << 'java runtime >= 17.0.1+'
39
41
  end
@@ -3,7 +3,7 @@
3
3
  * in their sketches. Includes a method to efficiently convert an array of web
4
4
  * strings to an array of color int, and another to convert an array of color
5
5
  * int to a string that can be used in ruby code (to generate web color array).
6
- * Copyright (c) 2015-20 Martin Prout.
6
+ * Copyright (c) 2015-22 Martin Prout.
7
7
  * This utility is free software; you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Lesser General Public License as published by
9
9
  * the Free Software Foundation; either version 2.1 of the License, or (at