Build Utilities
...

Build Tool
...

A build tool is a program or programming utility that automates the creation of executable applications from the source code.

The building process includes compiling, linking and packaging the code into a usable or executable form.

These steps may be accompanied by additional activities such as copying files to various directories, removing intermediate files, and generating documentation.

In smaller projects, developers usually perform all those build steps manually. In larger projects, this proves to be difficult.

The build tool comes with a BUILD FILE - a script that includes commands for the build tool to execute.

A build file describes how to build one project. Very large projects may be composed of multiple smaller projects, each with its own build file. A higher-level build file can coordinate the builds of the subprojects.

Each project contains multiple targets. Targets may represent actual outputs of the build, such as a redistributable file, or activities, such as compiling the source or running the tests.

Targets can depend on other targets. When declaring a target, you can specify which targets have to be built. first. This can ensure, for example, that the source gets compiled before the tests are run and built, and that the application is not uploaded until the tests have passed.

Targets contain tasks. Inside targets, you declare what actions need to be taken to complete that stage of the build process. You do this by listing the tasks that constitute each stage.

Tasks do the work. Ant tasks are XML elements that the Ant runtime turns into actions. Behind each task is a Java class that performs the work described by the task’s attributes and nested data.

Common Build Tools
...

  • Ant
    Java-based build tool from Apache.

  • Maven
    Another build tool for Java projects that supports dependency management.

  • Gradle
    Designed to support build automation across multiple languages and platforms including Java, Scala, Android, C/C++, and Groovy.

  • Grunt
    Build tool for front-end web development. A JavaScript task runner written in Node.js.

Directory Structure
...

src/main
...

Contains the primary source code files of the project.

src/test
...

Contains test code, including unit tests and integration tests, ensuring the functionality of the main application.

docs/
...

Documentation files like project specifications, design documents, and user manuals.

config/
...

Configuration files or scripts, including environment-specific settings.

lib/
...

External libraries or dependencies required by the project but not managed by a package manager.

bin/
...

Compiled or executable files of the project.

data/
...

Any data files used or generated by the project, like database files, sample data, or output data.

logs/
...

Directory for log files generated by the application or during build processes.

README.txt
...

A detailed summary of the project, including an introduction, purpose, and basic usage instructions.

LICENSE.txt
...

Complete licensing information, specifying how the project can be used, modified, and distributed.

NOTICE.txt
...

Details about third-party libraries and acknowledgments of any copyrighted material used in the project.

.gitignore
...

File specifying untracked files to be ignored by version control systems like Git or Mercurial.