crotwell / gradle-macappbundle

A Gradle Plugin to create a Mac OSX .app application and dmg based on the project.
Apache License 2.0
95 stars 33 forks source link

make appOutputDir a full path #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It is inconsistent that appOutputDir is a path fragment but icon and 
backgroundImg is a full path. Let's just let the user put the files anywhere 
they want and keep it consistent.

Original issue reported on code.google.com by aristede...@gmail.com on 5 Oct 2012 at 6:08

Attachments:

GoogleCodeExporter commented 9 years ago

The gradle convention seems to be that "output" paths are relative to the build 
dir and inputs are relative to the project dir, so that is what I have 
followed. Note that not specifying a "prefix" to the path, ie making it look 
like a full path, defaults to being relative to the project dir.

I have updated the comments on the appOutputDir and dmgOutputDir to say 
relative to build directory.

I think this convention makes sense, inputs in project directory, outputs in 
build directory.

Original comment by crotwell@seis.sc.edu on 5 Oct 2012 at 1:42

GoogleCodeExporter commented 9 years ago
I've seen lots of plugins which pass a "file" instead of a string path for 
inputs. That seems more robust to me (since it will fail in a clear place).

If we keep your approach, then what about the icon and background images? 
Should they also be relative paths?

Original comment by aristede...@gmail.com on 8 Oct 2012 at 2:23

GoogleCodeExporter commented 9 years ago
From the gradle api docs, the Project.file method:
   Resolves a file path relative to the project directory of this project.
so they are relative, just relative to the project directory instead of the 
build directory.

http://gradle.org/docs/current/dsl/org.gradle.api.Project.html#org.gradle.api.Pr
oject:file%28java.lang.Object%29

Original comment by crotwell@seis.sc.edu on 8 Oct 2012 at 11:55

GoogleCodeExporter commented 9 years ago
Yes, correct. But the resolution is in the build.gradle, not inside the plugin. 
This means that the user has complete control over what they pass.

I don't think this matters too much, but the inconsistency between sometimes 
passing paths and sometimes path fragments is confusing.

Original comment by aristede...@gmail.com on 10 Oct 2012 at 1:45

GoogleCodeExporter commented 9 years ago

Humm, I suppose I could use File instead of String, set the defaults as they 
are now and overload the setter so that a string does the resolution relative 
to the corresponding directory. 

Changing back to Accepted.

Original comment by crotwell@seis.sc.edu on 10 Oct 2012 at 12:20

GoogleCodeExporter commented 9 years ago

Original comment by crotwell@seis.sc.edu on 10 Oct 2012 at 12:20