The following features are supported:
The following features are supported:
TODO: Accumulate more project info here, such as the project package name, the minimum and target SDK API levels, etc.
Reflection
requirements, all variable names should map to database column names, with a slight twist: Whenever an underscore is encountered in the db column name, it should be excluded from the variable name here, but the following character should be capitalized. If the column name is 'first_name', for example, the variable here should be 'firstName'. Getters and setters should be named accordingly.
@author Mark Durant
@version 1.0
Project
class is for modeling a project - that is, a file or a set of files open at a time.
@author Sami Koivu
Responsibilities:
Project has a project directory, which is a canonical directory. All project files are relative to the project directory.
@author Andrus AdamchikThis class also encapsulates methods which allow Files to be refered to using abstract path names which are translated to native system file paths at runtime as well as defining various project properties. @author duncan@x180.com
Responsibilities:
The lookup is a generic container for any instance, thus modules are free to store and query anything they want to be stored within a project. @author Mathieu Bastian
You can also access the Project
instance using the project
property. This can make the script clearer in some cases. For example, you could use project.name
rather than name
to access the project's name.
A project has 5 property 'scopes', which it searches for properties. You can access these properties by name in your build file, or by calling the project's {@link #property(String)} method. The scopes are:
Project
object itself. This scope includes any property getters and setters declared by the Project
implementation class. For example, {@link #getRootProject()} is accessible as therootProject
property. The properties of this scope are readable or writable depending on the presence of the corresponding getter or setter method.compile
is accessible as the compile
property.When reading a property, the project searches the above scopes in order, and returns the value from the first scope it finds the property in. See {@link #property(String)} for more details.
When writing a property, the project searches the above scopes in order, and sets the property in the first scope it finds the property in. If not found, the project adds the property to its map of additional properties. See {@link #setProperty(String,Object)} for more details.
A project has 5 method 'scopes', which it searches for methods:
Project
object itself.compile
, then a method is added with the following signature: void compile(Closure configureClosure)
.Bytecode that has been parsed is held in a cache so that retrieving a class with the same name multiple times always returns the same {@link BCClass} instance.
A future goal is to eventually have facilities for traversing jars or directory structures to find classes that meet a given criteria (such as implementing a given interface, etc) and to perform operations on entire projects, similar to aspect-oriented programming.
@author Abe White
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|