66import java .io .File ;
77import java .util .ArrayList ;
88import java .util .Collections ;
9- import java .util .HashMap ;
109import java .util .List ;
1110import java .util .Map ;
1211import java .util .Set ;
2221import org .gradle .api .tasks .SourceSet ;
2322import org .gradle .process .JavaForkOptions ;
2423
25- import io .quarkus .bootstrap .model .ApplicationModel ;
2624import io .quarkus .deployment .pkg .NativeConfig ;
2725import io .quarkus .deployment .pkg .PackageConfig ;
2826import io .quarkus .gradle .dsl .Manifest ;
29- import io .quarkus .maven .dependency .ResolvedDependency ;
3027
3128/**
3229 * This base class exists to hide internal properties, make those only available in the {@link io.quarkus.gradle.tasks}
@@ -122,34 +119,6 @@ public NativeConfig nativeConfig() {
122119 return baseConfig ().nativeConfig ();
123120 }
124121
125- protected EffectiveConfig buildEffectiveConfiguration (ApplicationModel appModel ) {
126- ResolvedDependency appArtifact = appModel .getAppArtifact ();
127-
128- Map <String , Object > properties = new HashMap <>();
129- exportCustomManifestProperties (properties );
130-
131- Set <File > resourcesDirs = getSourceSet (project , SourceSet .MAIN_SOURCE_SET_NAME ).getResources ().getSourceDirectories ()
132- .getFiles ();
133-
134- Map <String , String > defaultProperties = new HashMap <>();
135- String userIgnoredEntries = String .join ("," , ignoredEntries .get ());
136- if (!userIgnoredEntries .isEmpty ()) {
137- defaultProperties .put ("quarkus.package.jar.user-configured-ignored-entries" , userIgnoredEntries );
138- }
139- defaultProperties .putIfAbsent ("quarkus.application.name" , appArtifact .getArtifactId ());
140- defaultProperties .putIfAbsent ("quarkus.application.version" , appArtifact .getVersion ());
141-
142- return EffectiveConfig .builder ()
143- .withPlatformProperties (appModel .getPlatformProperties ())
144- .withTaskProperties (properties )
145- .withBuildProperties (quarkusBuildProperties .get ())
146- .withProjectProperties (project .getProperties ())
147- .withDefaultProperties (defaultProperties )
148- .withSourceDirectories (resourcesDirs )
149- .withProfile (quarkusProfile ())
150- .build ();
151- }
152-
153122 private String quarkusProfile () {
154123 String profile = System .getProperty (QUARKUS_PROFILE );
155124 if (profile == null ) {
@@ -176,20 +145,6 @@ private static FileCollection dependencyClasspath(SourceSet mainSourceSet) {
176145 .plus (mainSourceSet .getResources ());
177146 }
178147
179- private void exportCustomManifestProperties (Map <String , Object > properties ) {
180- for (Map .Entry <String , Object > attribute : baseConfig ().manifest ().getAttributes ().entrySet ()) {
181- properties .put (toManifestAttributeKey (attribute .getKey ()),
182- attribute .getValue ());
183- }
184-
185- for (Map .Entry <String , Attributes > section : baseConfig ().manifest ().getSections ().entrySet ()) {
186- for (Map .Entry <String , Object > attribute : section .getValue ().entrySet ()) {
187- properties
188- .put (toManifestSectionAttributeKey (section .getKey (), attribute .getKey ()), attribute .getValue ());
189- }
190- }
191- }
192-
193148 protected static String toManifestAttributeKey (String key ) {
194149 if (key .contains ("\" " )) {
195150 throw new GradleException ("Manifest entry name " + key + " is invalid. \" characters are not allowed." );
0 commit comments