Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clashsoft/angular-gradle
Integrate Angular frontends into your Gradle build.
https://github.com/clashsoft/angular-gradle
Last synced: 12 days ago
JSON representation
Integrate Angular frontends into your Gradle build.
- Host: GitHub
- URL: https://github.com/clashsoft/angular-gradle
- Owner: Clashsoft
- License: bsd-3-clause
- Created: 2020-02-09T18:55:32.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-10T13:47:06.000Z (9 months ago)
- Last Synced: 2024-10-16T11:43:32.280Z (23 days ago)
- Language: Groovy
- Size: 117 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Angular Gradle Plugin
[![Build Status](https://travis-ci.org/Clashsoft/Angular-Gradle.svg?branch=master)](https://travis-ci.org/Clashsoft/Angular-Gradle)
This plugin allows you to integrate Angular frontends into your Gradle build.
## Full Example
See the [Angular Gradle Demo project](https://github.com/Clashsoft/Angular-Gradle-Demo) for detailed instructions on how to set up Angular with Gradle.
## Installation
Add to the top of `build.gradle`:
```groovy
plugins {
// ...
id 'de.clashsoft.angular-gradle' version '0.2.0'
}
```## Configuration
[Project Properties](https://docs.gradle.org/current/userguide/build_environment.html#sec:project_properties):
```properties
no-angular = false # indicates Angular should not be included in the build. Useful for testing frontend and backend separately, e.g. with `ng serve`.
angular-configuration = production # the value for `ng build --configuration `.
```In `build.gradle` (default values shown after `=`):
```groovy
angular {
appDir = 'src/main/app' // root directory of your Angular app
outputDir = "$appDir/dist/$project.name" // output directory of Angular build. Default assumes Angular project has the same name as the gradle project.
packageManager = /* result of `ng config cli.packageManager`, plus .cmd on Windows) */'' // for installing packages prior to Angular build
packageManagerArgs = [ 'install' ] // arguments for installing packages, passed to package manager
buildArgs = [ 'build', '--configuration=' + (project.findProperty('angular-configuration') ?: 'production') ] // arguments for building Angular app
}
```
> The output of the angular build task (content of the `outputDir` path) is set as main resources target which copies the compiled angular application bundles into static resources build directory