Skip to content

Commit

Permalink
remove AwtFeature
Browse files Browse the repository at this point in the history
  • Loading branch information
kairoh committed Oct 7, 2023
1 parent 139ec38 commit e7fbe64
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import java.util.List;
import java.util.stream.Stream;

import io.quarkus.awt.runtime.graal.AwtFeature;
import io.quarkus.awt.runtime.graal.DarwinAwtFeature;
import io.quarkus.awt.runtime.graal.WindowsAwtFeature;
import io.quarkus.deployment.Feature;
Expand Down Expand Up @@ -38,13 +37,14 @@ void nativeImageFeatures(BuildProducer<NativeImageFeatureBuildItem> nativeImageF
nativeImageFeatures.produce(new NativeImageFeatureBuildItem(WindowsAwtFeature.class));
}

// k: comment to allow Win
// @BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
// UnsupportedOSBuildItem osSupportCheck() {
// return new UnsupportedOSBuildItem(WINDOWS,
// "Windows AWT integration is not ready in native-image and would result in " +
// "java.lang.UnsatisfiedLinkError: no awt in java.library.path.");
// }
/* k: bloc commented to allow Win
@BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
UnsupportedOSBuildItem osSupportCheck() {
return new UnsupportedOSBuildItem(WINDOWS,
"Windows AWT integration is not ready in native-image and would result in " +
"java.lang.UnsatisfiedLinkError: no awt in java.library.path.");
}
*/

@BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
NativeMinimalJavaVersionBuildItem nativeMinimalJavaVersionBuildItem() {
Expand Down Expand Up @@ -126,120 +126,7 @@ void setupAWTInit(BuildProducer<JniRuntimeAccessBuildItem> jc,
/*
@BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
JniRuntimeAccessBuildItem setupJava2DClasses() {
return new JniRuntimeAccessBuildItem(true, true, true,
"com.sun.imageio.plugins.jpeg.JPEGImageReader",
"com.sun.imageio.plugins.jpeg.JPEGImageWriter",
"java.awt.AlphaComposite",
"java.awt.Color",
"java.awt.color.CMMException",
"java.awt.color.ColorSpace",
"java.awt.color.ICC_Profile",
"java.awt.color.ICC_ProfileGray",
"java.awt.color.ICC_ProfileRGB",
"java.awt.geom.AffineTransform",
"java.awt.geom.GeneralPath",
"java.awt.geom.Path2D",
"java.awt.geom.Path2D$Float",
"java.awt.geom.Point2D$Float",
"java.awt.geom.Rectangle2D$Float",
"java.awt.image.AffineTransformOp",
"java.awt.image.BandedSampleModel",
"java.awt.image.BufferedImage",
"java.awt.image.ColorModel",
"java.awt.image.ComponentColorModel",
"java.awt.image.ComponentSampleModel",
"java.awt.image.ConvolveOp",
"java.awt.image.DirectColorModel",
"java.awt.image.IndexColorModel",
"java.awt.image.Kernel",
"java.awt.image.MultiPixelPackedSampleModel",
"java.awt.image.PackedColorModel",
"java.awt.image.PixelInterleavedSampleModel",
"java.awt.image.Raster",
"java.awt.image.SampleModel",
"java.awt.image.SinglePixelPackedSampleModel",
"java.awt.Transparency",
"javax.imageio.IIOException",
"javax.imageio.plugins.jpeg.JPEGHuffmanTable",
"javax.imageio.plugins.jpeg.JPEGQTable",
"sun.awt.image.BufImgSurfaceData",
"sun.awt.image.BufImgSurfaceData$ICMColorData",
"sun.awt.image.ByteBandedRaster",
"sun.awt.image.ByteComponentRaster",
"sun.awt.image.ByteInterleavedRaster",
"sun.awt.image.BytePackedRaster",
"sun.awt.image.DataBufferNative",
"sun.awt.image.GifImageDecoder",
"sun.awt.image.ImageRepresentation",
"sun.awt.image.ImagingLib",
"sun.awt.image.IntegerComponentRaster",
"sun.awt.image.IntegerInterleavedRaster",
"sun.awt.image.ShortBandedRaster",
"sun.awt.image.ShortComponentRaster",
"sun.awt.image.ShortInterleavedRaster",
"sun.awt.image.SunWritableRaster",
"sun.awt.image.WritableRasterNative",
"sun.awt.SunHints",
"sun.font.CharToGlyphMapper",
"sun.font.Font2D",
"sun.font.FontConfigManager",
"sun.font.FontManagerNativeLibrary",
"sun.font.FontStrike",
// Added for JDK 19+ due to: https://github.com/openjdk/jdk20/commit/9bc023220 calling FontUtilities
"sun.font.FontUtilities",
"sun.font.FreetypeFontScaler",
"sun.font.GlyphLayout",
"sun.font.GlyphLayout$EngineRecord",
"sun.font.GlyphLayout$GVData",
"sun.font.GlyphLayout$LayoutEngine",
"sun.font.GlyphLayout$LayoutEngineFactory",
"sun.font.GlyphLayout$LayoutEngineKey",
"sun.font.GlyphLayout$SDCache",
"sun.font.GlyphLayout$SDCache$SDKey",
"sun.font.GlyphList",
"sun.font.PhysicalStrike",
"sun.font.StrikeMetrics",
"sun.font.TrueTypeFont",
"sun.font.Type1Font",
"sun.java2d.cmm.lcms.LCMSImageLayout",
"sun.java2d.cmm.lcms.LCMSProfile",
"sun.java2d.cmm.lcms.LCMSTransform",
"sun.java2d.DefaultDisposerRecord",
"sun.java2d.Disposer",
"sun.java2d.InvalidPipeException",
"sun.java2d.loops.Blit",
"sun.java2d.loops.BlitBg",
"sun.java2d.loops.CompositeType",
"sun.java2d.loops.DrawGlyphList",
"sun.java2d.loops.DrawGlyphListAA",
"sun.java2d.loops.DrawGlyphListLCD",
"sun.java2d.loops.DrawLine",
"sun.java2d.loops.DrawParallelogram",
"sun.java2d.loops.DrawPath",
"sun.java2d.loops.DrawPolygons",
"sun.java2d.loops.DrawRect",
"sun.java2d.loops.FillParallelogram",
"sun.java2d.loops.FillPath",
"sun.java2d.loops.FillRect",
"sun.java2d.loops.FillSpans",
"sun.java2d.loops.GraphicsPrimitive",
"sun.java2d.loops.GraphicsPrimitiveMgr",
"sun.java2d.loops.MaskBlit",
"sun.java2d.loops.MaskFill",
"sun.java2d.loops.ScaledBlit",
"sun.java2d.loops.SurfaceType",
"sun.java2d.loops.TransformHelper",
"sun.java2d.loops.XORComposite",
"sun.java2d.NullSurfaceData",
"sun.java2d.pipe.BufferedMaskBlit",
"sun.java2d.pipe.GlyphListPipe",
"sun.java2d.pipe.Region",
"sun.java2d.pipe.RegionIterator",
"sun.java2d.pipe.ShapeSpanIterator",
"sun.java2d.pipe.SpanClipRenderer",
"sun.java2d.pipe.ValidatePipe",
"sun.java2d.SunGraphics2D",
"sun.java2d.SurfaceData",
return new JniRuntimeAccessBuildItem(true, true, tru
// Java 20 :test
"javax.imageio.ImageIO",
"javax.imageio.spi.ImageReaderSpi",
Expand Down

This file was deleted.

0 comments on commit e7fbe64

Please sign in to comment.