File tree Expand file tree Collapse file tree 3 files changed +24
-39
lines changed Expand file tree Collapse file tree 3 files changed +24
-39
lines changed Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ protected void bundleJre() {
191
191
Runtime runtime = new Runtime ( jreDir );
192
192
if ( task instanceof Dmg ) {
193
193
List <String > include = ((Dmg )task ).getJreIncludes ();
194
- List <String > exclude = ((Dmg )task ).getJreExclude ();
194
+ List <String > exclude = ((Dmg )task ).getJreExcludes ();
195
195
196
196
runtime .appendIncludes ( include .toArray ( new String [include .size ()] ) );
197
197
runtime .appendExcludes ( exclude .toArray ( new String [exclude .size ()] ) );
Original file line number Diff line number Diff line change @@ -49,9 +49,25 @@ public class Dmg extends AbstractUnixSetupTask {
49
49
50
50
private List <PreferencesLink > preferencesLink = new ArrayList <>();
51
51
52
- private List <String > jreIncludes = Arrays .asList ( "bin/java" );
53
-
54
- private List <String > jreExclude = new ArrayList <>();
52
+ private List <String > jreIncludes = Arrays .asList ( new String [] {
53
+ "lib/" ,
54
+ "COPYRIGHT" ,
55
+ "LICENSE" ,
56
+ "README" ,
57
+ "THIRDPARTYLICENSEREADME-JAVAFX.txt" ,
58
+ "THIRDPARTYLICENSEREADME.txt" ,
59
+ "Welcome.html"
60
+ });
61
+
62
+ private List <String > jreExcludes = Arrays .asList ( new String [] {
63
+ "lib/deploy/" ,
64
+ "lib/deploy.jar" ,
65
+ "lib/javaws.jar" ,
66
+ "lib/libdeploy.dylib" ,
67
+ "lib/libnpjp2.dylib" ,
68
+ "lib/plugin.jar" ,
69
+ "lib/security/javaws.policy"
70
+ });
55
71
56
72
/**
57
73
* Create the task.
@@ -297,15 +313,15 @@ public void setJreIncludes( List<String> jreIncludes ) {
297
313
* Get a list of string - defining files - that should be excluded from the bundled JRE
298
314
* @return the jreExclude
299
315
*/
300
- public List <String > getJreExclude () {
301
- return jreExclude ;
316
+ public List <String > getJreExcludes () {
317
+ return jreExcludes ;
302
318
}
303
319
304
320
/**
305
321
* Set a list of string - defining files - that should be excluded from the bundled JRE
306
322
* @param jreExclude the jreExclude to set
307
323
*/
308
- public void setJreExclude ( List <String > jreExclude ) {
309
- this .jreExclude = jreExclude ;
324
+ public void setJreExcludes ( List <String > jreExclude ) {
325
+ this .jreExcludes = jreExclude ;
310
326
}
311
327
}
Original file line number Diff line number Diff line change @@ -92,44 +92,13 @@ private void patchIncludeExcludes( String[] includExclude ) {
92
92
}
93
93
}
94
94
95
- /**
96
- * check the type of the runtime set.
97
- * If it is a JDK we want to exclude certain predefined entries
98
- */
99
- private void detectType () {
100
- boolean isJDK = new File (getDir (), "jre" ).isDirectory ();
101
-
102
- appendIncludes (new String [] {
103
- "lib/" ,
104
- "COPYRIGHT" ,
105
- "LICENSE" ,
106
- "README" ,
107
- "THIRDPARTYLICENSEREADME-JAVAFX.txt" ,
108
- "THIRDPARTYLICENSEREADME.txt" ,
109
- "Welcome.html"
110
- });
111
-
112
- if (isJDK ) {
113
- appendExcludes (new String [] {
114
- "jre/lib/deploy/" ,
115
- "jre/lib/deploy.jar" ,
116
- "jre/lib/javaws.jar" ,
117
- "jre/lib/libdeploy.dylib" ,
118
- "jre/lib/libnpjp2.dylib" ,
119
- "jre/lib/plugin.jar" ,
120
- "jre/lib/security/javaws.policy"
121
- });
122
- }
123
- }
124
-
125
95
/**
126
96
* Finally copy the files of the jre
127
97
* @param targetDir where to copy
128
98
* @param project the project we're working on
129
99
* @throws IOException in case of errors
130
100
*/
131
101
void copyTo (File targetDir , Project project ) throws IOException {
132
- detectType ();
133
102
134
103
File runtimeHomeDirectory = getDir ();
135
104
File runtimeContentsDirectory = runtimeHomeDirectory .getParentFile ();
You can’t perform that action at this time.
0 commit comments