@@ -144,13 +144,17 @@ private void processClasspath() {
144144 }
145145
146146 /**
147- * Creates and writes the Info.plist file
147+ * Creates and writes the Info.plist file if no custom file is specified.
148148 * @throws Exception if anything goes wrong
149149 */
150150 private void processInfoPlistFile () throws Exception {
151151 File infoPlistFile = new File (contentsFolder , "Info.plist" );
152- VelocityUtils .render ("mac/Info.plist.vtl" , infoPlistFile , this );
153- XMLUtils .prettify (infoPlistFile );
152+ if (macConfig .getCustomInfoPlist () != null && macConfig .getCustomInfoPlist ().isFile () && macConfig .getCustomInfoPlist ().canRead ()){
153+ FileUtils .copyFileToFile (macConfig .getCustomInfoPlist (), infoPlistFile );
154+ } else {
155+ VelocityUtils .render ("mac/Info.plist.vtl" , infoPlistFile , this );
156+ XMLUtils .prettify (infoPlistFile );
157+ }
154158 Logger .info ("Info.plist file created in " + infoPlistFile .getAbsolutePath ());
155159 }
156160
@@ -165,7 +169,7 @@ private void codesign() throws Exception {
165169 }
166170
167171 private void processProvisionProfileFile () throws Exception {
168- if (macConfig .getProvisionProfile () != null ) {
172+ if (macConfig .getProvisionProfile () != null && macConfig . getProvisionProfile (). isFile () && macConfig . getProvisionProfile (). canRead () ) {
169173 // file name must be 'embedded.provisionprofile'
170174 File provisionProfile = new File (contentsFolder , "embedded.provisionprofile" );
171175 FileUtils .copyFileToFile (macConfig .getProvisionProfile (), provisionProfile );
0 commit comments