Skip to content

Commit

Permalink
Enable RTF
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Oct 2, 2024
1 parent bf6300f commit 6628dd2
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,16 @@ void indexTransitiveDependencies(BuildProducer<IndexDependencyBuildItem> index)
index.produce(new IndexDependencyBuildItem("org.apache.xmlgraphics", "batik-bridge"));
index.produce(new IndexDependencyBuildItem("com.ibm.icu", "icu4j"));
index.produce(new IndexDependencyBuildItem("com.drewnoakes", "metadata-extractor"));
index.produce(new IndexDependencyBuildItem("org.jfree", "jcommon"));
index.produce(new IndexDependencyBuildItem("org.jfree", "jfreechart"));
}

@BuildStep
void runtimeInitializedClasses(BuildProducer<RuntimeInitializedPackageBuildItem> runtimeInitializedPackages) {
//@formatter:off
Stream.of(
javax.swing.plaf.metal.MetalIconFactory.class.getPackageName()
javax.swing.plaf.metal.MetalIconFactory.class.getPackageName(),
org.jfree.chart.servlet.ServletUtilities.class.getPackageName()
)
.map(RuntimeInitializedPackageBuildItem::new)
.forEach(runtimeInitializedPackages::produce);
Expand Down Expand Up @@ -77,6 +80,8 @@ void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveCla

final List<String> classNames = new ArrayList<>();
classNames.add(java.awt.Color.class.getName());
classNames.add(java.awt.geom.Rectangle2D.class.getName());
classNames.add(java.awt.BasicStroke.class.getName());
// All utilities
classNames.addAll(collectClassesInPackage(combinedIndex,
net.sf.jasperreports.renderers.util.RendererUtil.class.getPackageName()));
Expand All @@ -87,6 +92,49 @@ void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveCla
classNames.addAll(collectClassesInPackage(combinedIndex,
net.sf.jasperreports.renderers.WrappingSvgDataToGraphics2DRenderer.class.getPackageName()));

classNames.addAll(collectClassesInPackage(combinedIndex,
net.sf.jasperreports.charts.ChartContext.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
net.sf.jasperreports.charts.util.ChartUtil.class.getPackageName()));

// JFREECHART
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.chart.JFreeChart.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.chart.axis.Axis.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.chart.labels.CategoryItemLabelGenerator.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.chart.plot.Plot.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.chart.plot.dial.DialBackground.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.chart.renderer.category.BarRenderer.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.chart.renderer.xy.CandlestickRenderer.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.chart.title.LegendTitle.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.data.Range.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.data.category.CategoryDataset.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.data.gantt.GanttCategoryDataset.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.data.general.Dataset.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.data.time.TimeSeriesCollection.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.data.xy.DefaultHighLowDataset.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.data.xy.XYDataset.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.ui.TextAnchor.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.util.ShapeUtilities.class.getPackageName()));
classNames.addAll(collectClassesInPackage(combinedIndex,
org.jfree.io.SerialUtilities.class.getPackageName()));

reflectiveClass.produce(
ReflectiveClassBuildItem.builder(classNames.toArray(new String[0])).constructors().methods().fields()
.serialization()
Expand Down
30 changes: 30 additions & 0 deletions runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,41 @@
<version>75.1</version>
</dependency>

<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-anim</artifactId>
<version>1.17</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-awt-util</artifactId>
<version>1.17</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-bridge</artifactId>
<version>1.17</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-dom</artifactId>
<version>1.17</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-gvt</artifactId>
<version>1.17</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svg-dom</artifactId>
<version>1.17</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svggen</artifactId>
<version>1.17</version>
</dependency>

<dependency>
<groupId>antlr</groupId>
Expand Down

0 comments on commit 6628dd2

Please sign in to comment.