@@ -44,6 +44,8 @@ public class Alias extends CatalogItem {
4444 public final Boolean nativeImage ;
4545 @ SerializedName (value = "native-options" )
4646 public final List <String > nativeOptions ;
47+ @ SerializedName (value = "source-type" )
48+ public final String forceType ;
4749 public final Boolean integrations ;
4850 public final String jfr ;
4951 public final Map <String , String > debug ;
@@ -93,7 +95,7 @@ public int hashCode() {
9395
9496 public Alias () {
9597 this (null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null ,
96- null , null , null , null , null , null , null , null , null , null );
98+ null , null , null , null , null , null , null , null , null , null , null );
9799 }
98100
99101 public Alias (String scriptRef ,
@@ -112,6 +114,7 @@ public Alias(String scriptRef,
112114 List <String > compileOptions ,
113115 Boolean nativeImage ,
114116 List <String > nativeOptions ,
117+ String forceType ,
115118 Boolean integrations ,
116119 String jfr ,
117120 Map <String , String > debug ,
@@ -141,6 +144,7 @@ public Alias(String scriptRef,
141144 this .compileOptions = compileOptions ;
142145 this .nativeImage = nativeImage ;
143146 this .nativeOptions = nativeOptions ;
147+ this .forceType = forceType ;
144148 this .integrations = integrations ;
145149 this .jfr = jfr ;
146150 this .debug = debug ;
@@ -240,6 +244,7 @@ private static Alias merge(Alias a1, String name, Function<String, Alias> findUn
240244 : a2 .compileOptions ;
241245 List <String > nopts = a1 .nativeOptions != null && !a1 .nativeOptions .isEmpty () ? a1 .nativeOptions
242246 : a2 .nativeOptions ;
247+ String forceType = a1 .forceType != null ? a1 .forceType : a2 .forceType ;
243248 Boolean nimg = a1 .nativeImage != null ? a1 .nativeImage : a2 .nativeImage ;
244249 Boolean ints = a1 .integrations != null ? a1 .integrations : a2 .integrations ;
245250 String jfr = a1 .jfr != null ? a1 .jfr : a2 .jfr ;
@@ -255,8 +260,8 @@ private static Alias merge(Alias a1, String name, Function<String, Alias> findUn
255260 List <String > docs = a1 .docs != null && !a1 .docs .isEmpty () ? a1 .docs : a2 .docs ;
256261 Catalog catalog = a2 .catalog != null ? a2 .catalog : a1 .catalog ;
257262 return new Alias (a2 .scriptRef , desc , args , jopts , srcs , ress , deps , repos , cpaths , props , javaVersion ,
258- mainClass , moduleName , copts , nimg , nopts , ints , jfr , debug , cds , inter , ep , ea , esa , mopts , jags ,
259- docs , catalog );
263+ mainClass , moduleName , copts , nimg , nopts , forceType , ints , jfr , debug , cds , inter , ep , ea , esa ,
264+ mopts , jags , docs , catalog );
260265 } else {
261266 return a1 ;
262267 }
@@ -300,14 +305,21 @@ private static Alias fromCatalog(String catalogName, String aliasName) {
300305 public Alias withCatalog (Catalog catalog ) {
301306 return new Alias (scriptRef , description , arguments , runtimeOptions , sources , resources , dependencies ,
302307 repositories , classpaths , properties , javaVersion , mainClass , moduleName , compileOptions , nativeImage ,
303- nativeOptions , integrations , jfr , debug , cds , interactive , enablePreview , enableAssertions ,
308+ nativeOptions , forceType , integrations , jfr , debug , cds , interactive , enablePreview , enableAssertions ,
304309 enableSystemAssertions , manifestOptions , javaAgents , docs , catalog );
305310 }
306311
307312 public Alias withScriptRef (String scriptRef ) {
308313 return new Alias (scriptRef , description , arguments , runtimeOptions , sources , resources , dependencies ,
309314 repositories , classpaths , properties , javaVersion , mainClass , moduleName , compileOptions , nativeImage ,
310- nativeOptions , integrations , jfr , debug , cds , interactive , enablePreview , enableAssertions ,
315+ nativeOptions , forceType , integrations , jfr , debug , cds , interactive , enablePreview , enableAssertions ,
316+ enableSystemAssertions , manifestOptions , javaAgents , docs , catalog );
317+ }
318+
319+ public Alias withForceType (String forceType ) {
320+ return new Alias (scriptRef , description , arguments , runtimeOptions , sources , resources , dependencies ,
321+ repositories , classpaths , properties , javaVersion , mainClass , moduleName , compileOptions , nativeImage ,
322+ nativeOptions , forceType , integrations , jfr , debug , cds , interactive , enablePreview , enableAssertions ,
311323 enableSystemAssertions , manifestOptions , javaAgents , docs , catalog );
312324 }
313325}
0 commit comments