1717
1818import java .io .File ;
1919import java .util .ArrayList ;
20+ import java .util .Arrays ;
2021import java .util .List ;
2122
2223import org .gradle .api .internal .project .ProjectInternal ;
3132
3233/**
3334 * The dmg Gradle task. It build a dmg package for Mac.
34- *
35+ *
3536 * @author Volker Berlin
3637 */
3738public class Dmg extends AbstractUnixSetupTask {
@@ -48,6 +49,10 @@ public class Dmg extends AbstractUnixSetupTask {
4849
4950 private List <PreferencesLink > preferencesLink = new ArrayList <>();
5051
52+ private List <String > jreIncludes = Arrays .asList ( "bin/java" );
53+
54+ private List <String > jreExclude = new ArrayList <>();
55+
5156 /**
5257 * Create the task.
5358 */
@@ -66,7 +71,7 @@ public void build() {
6671
6772 /**
6873 * Return width of Finder view
69- *
74+ *
7075 * @return width of Finder view
7176 */
7277 public Integer getWindowWidth () {
@@ -75,7 +80,7 @@ public Integer getWindowWidth() {
7580
7681 /**
7782 * Set width of Finder view
78- *
83+ *
7984 * @param windowWidth width of Finder view
8085 */
8186 public void setWindowWidth ( Integer windowWidth ) {
@@ -84,7 +89,7 @@ public void setWindowWidth( Integer windowWidth ) {
8489
8590 /**
8691 * Return height of Finder view
87- *
92+ *
8893 * @return height of Finder view
8994 */
9095 public Integer getWindowHeight () {
@@ -93,7 +98,7 @@ public Integer getWindowHeight() {
9398
9499 /**
95100 * Set height of Finder view
96- *
101+ *
97102 * @param windowHeight of Finder view
98103 */
99104 public void setWindowHeight ( Integer windowHeight ) {
@@ -102,7 +107,7 @@ public void setWindowHeight( Integer windowHeight ) {
102107
103108 /**
104109 * Return size of icons in Finder view
105- *
110+ *
106111 * @return size of icons in Finder view
107112 */
108113 public Integer getIconSize () {
@@ -111,7 +116,7 @@ public Integer getIconSize() {
111116
112117 /**
113118 * Set size of icons in Finder view
114- *
119+ *
115120 * @param iconSize of icons in Finder view
116121 */
117122 public void setIconSize ( Integer iconSize ) {
@@ -120,7 +125,7 @@ public void setIconSize( Integer iconSize ) {
120125
121126 /**
122127 * Return background Image for Finder View
123- *
128+ *
124129 * @return background Image for Finder View
125130 */
126131 public File getBackgroundImage () {
@@ -132,7 +137,7 @@ public File getBackgroundImage() {
132137
133138 /**
134139 * Set background Image for Finder View
135- *
140+ *
136141 * @param backgroundFile Image for Finder View
137142 */
138143 public void setBackgroundImage ( File backgroundFile ) {
@@ -141,7 +146,7 @@ public void setBackgroundImage( File backgroundFile ) {
141146
142147 /**
143148 * Return font size for Finder View
144- *
149+ *
145150 * @return font size for Finder View
146151 */
147152 public Integer getFontSize () {
@@ -150,7 +155,7 @@ public Integer getFontSize() {
150155
151156 /**
152157 * Set font size for Finder View
153- *
158+ *
154159 * @param fontSize size for Finder View
155160 */
156161 public void setFontSize ( Integer fontSize ) {
@@ -159,7 +164,7 @@ public void setFontSize( Integer fontSize ) {
159164
160165 /**
161166 * Set the needed information for signing the setup.
162- *
167+ *
163168 * @param closue the data for signing
164169 */
165170 public void setCodeSign ( Closure <OSXCodeSign <Dmg , SetupBuilder >> closue ) {
@@ -169,7 +174,7 @@ public void setCodeSign( Closure<OSXCodeSign<Dmg, SetupBuilder>> closue ) {
169174
170175 /**
171176 * Get the SignTool configuration if set
172- *
177+ *
173178 * @return the settings or null
174179 */
175180 public OSXCodeSign <Dmg , SetupBuilder > getCodeSign () {
@@ -179,7 +184,7 @@ public OSXCodeSign<Dmg, SetupBuilder> getCodeSign() {
179184 /**
180185 * Return the welcome page list
181186 * Allowed Format: rtf, rtfd, txt, html
182- *
187+ *
183188 * @return welcome page
184189 */
185190 public List <LocalizedResource > getConclusionPages () {
@@ -189,7 +194,7 @@ public List<LocalizedResource> getConclusionPages() {
189194 /**
190195 * Set the welcome page
191196 * Allowed Format: rtf, rtfd, txt, html
192- *
197+ *
193198 * @param conclusionPage which is shown at the end
194199 */
195200 public void conclusionPage ( Object conclusionPage ) {
@@ -199,7 +204,7 @@ public void conclusionPage( Object conclusionPage ) {
199204 /**
200205 * Return the welcome page list
201206 * Allowed Format: rtf, rtfd, txt, html
202- *
207+ *
203208 * @return welcome page
204209 */
205210 public List <LocalizedResource > getWelcomePages () {
@@ -209,7 +214,7 @@ public List<LocalizedResource> getWelcomePages() {
209214 /**
210215 * Set the welcome page
211216 * Allowed Format: rtf, rtfd, txt, html
212- *
217+ *
213218 * @param welcomePage welcome page file
214219 */
215220 public void welcomePage ( Object welcomePage ) {
@@ -218,7 +223,7 @@ public void welcomePage( Object welcomePage ) {
218223
219224 /**
220225 * Return the background image for the setup
221- *
226+ *
222227 * @return background image
223228 */
224229 public File getSetupBackgroundImage () {
@@ -230,7 +235,7 @@ public File getSetupBackgroundImage() {
230235
231236 /**
232237 * Set the background image for the setup
233- *
238+ *
234239 * @param setupBackground to set
235240 */
236241 public void setSetupBackgroundImage ( Object setupBackground ) {
@@ -256,7 +261,7 @@ public void setSetupIcon( Object setupIcon ) {
256261
257262 /**
258263 * Return the list of preferences links
259- *
264+ *
260265 * @return preferences links
261266 */
262267 public List <PreferencesLink > getPreferencesLinks () {
@@ -265,10 +270,42 @@ public List<PreferencesLink> getPreferencesLinks() {
265270
266271 /**
267272 * Set a preferences link
268- *
273+ *
269274 * @param link the link
270275 */
271276 public void preferencesLink ( Object link ) {
272277 preferencesLink .add ( ConfigureUtil .configure ( (Closure <?>)link , new PreferencesLink () ) );
273278 }
279+
280+ /**
281+ * Get a list of string - defining files - that should be included in the bundled JRE
282+ * @return the jreIncludes
283+ */
284+ public List <String > getJreIncludes () {
285+ return jreIncludes ;
286+ }
287+
288+ /**
289+ * Set a list of string - defining files - that should be included in the bundled JRE
290+ * @param jreIncludes the jreIncludes to set
291+ */
292+ public void setJreIncludes ( List <String > jreIncludes ) {
293+ this .jreIncludes = jreIncludes ;
294+ }
295+
296+ /**
297+ * Get a list of string - defining files - that should be excluded from the bundled JRE
298+ * @return the jreExclude
299+ */
300+ public List <String > getJreExclude () {
301+ return jreExclude ;
302+ }
303+
304+ /**
305+ * Set a list of string - defining files - that should be excluded from the bundled JRE
306+ * @param jreExclude the jreExclude to set
307+ */
308+ public void setJreExclude ( List <String > jreExclude ) {
309+ this .jreExclude = jreExclude ;
310+ }
274311}
0 commit comments