File tree Expand file tree Collapse file tree 4 files changed +64
-0
lines changed
amazon-lambda/common-deployment/src/main
java/io/quarkus/amazon/lambda/deployment
resources/META-INF/services
funqy/funqy-google-cloud-functions/deployment/src/main
java/io/quarkus/funqy/gcp/functions/deployment/bindings
resources/META-INF/services Expand file tree Collapse file tree 4 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ package io .quarkus .amazon .lambda .deployment ;
2+
3+ import java .util .OptionalInt ;
4+
5+ import io .smallrye .config .ConfigSourceInterceptor ;
6+ import io .smallrye .config .ConfigSourceInterceptorContext ;
7+ import io .smallrye .config .ConfigSourceInterceptorFactory ;
8+ import io .smallrye .config .ConfigValue ;
9+ import io .smallrye .config .SmallRyeConfigBuilder ;
10+ import io .smallrye .config .SmallRyeConfigBuilderCustomizer ;
11+
12+ /**
13+ * A configuration customizer to change the default packaging to legacy-jar.
14+ */
15+ public final class ConfigurationCustomizer implements SmallRyeConfigBuilderCustomizer {
16+ public void configBuilder (final SmallRyeConfigBuilder builder ) {
17+ builder .withInterceptorFactories (new ConfigSourceInterceptorFactory () {
18+ public ConfigSourceInterceptor getInterceptor (final ConfigSourceInterceptorContext context ) {
19+ return (ic , name ) -> switch (name ) {
20+ case "quarkus.package.jar.type" ->
21+ ConfigValue .builder ().withName (name ).withValue ("legacy-jar" ).build ();
22+ default -> ic .proceed (name );
23+ };
24+ }
25+
26+ public OptionalInt getPriority () {
27+ return OptionalInt .of (Integer .MIN_VALUE + 100 );
28+ }
29+ });
30+ }
31+ }
Original file line number Diff line number Diff line change 1+ io.quarkus.amazon.lambda.deployment.ConfigurationCustomizer
Original file line number Diff line number Diff line change 1+ package io .quarkus .funqy .gcp .functions .deployment .bindings ;
2+
3+ import java .util .OptionalInt ;
4+
5+ import io .smallrye .config .ConfigSourceInterceptor ;
6+ import io .smallrye .config .ConfigSourceInterceptorContext ;
7+ import io .smallrye .config .ConfigSourceInterceptorFactory ;
8+ import io .smallrye .config .ConfigValue ;
9+ import io .smallrye .config .SmallRyeConfigBuilder ;
10+ import io .smallrye .config .SmallRyeConfigBuilderCustomizer ;
11+
12+ /**
13+ * A configuration customizer to change the default packaging to uber-jar.
14+ */
15+ public final class ConfigurationCustomizer implements SmallRyeConfigBuilderCustomizer {
16+ public void configBuilder (final SmallRyeConfigBuilder builder ) {
17+ builder .withInterceptorFactories (new ConfigSourceInterceptorFactory () {
18+ public ConfigSourceInterceptor getInterceptor (final ConfigSourceInterceptorContext context ) {
19+ return (ic , name ) -> switch (name ) {
20+ case "quarkus.package.jar.type" ->
21+ ConfigValue .builder ().withName (name ).withValue ("uber-jar" ).build ();
22+ default -> ic .proceed (name );
23+ };
24+ }
25+
26+ public OptionalInt getPriority () {
27+ return OptionalInt .of (Integer .MIN_VALUE + 100 );
28+ }
29+ });
30+ }
31+ }
Original file line number Diff line number Diff line change 1+ io.quarkus.funqy.gcp.functions.deployment.bindings.ConfigurationCustomizer
You can’t perform that action at this time.
0 commit comments