A build system inspired by spring boot auto configure. Basically it adapt to your project source code structure and automatically apply the build logic which is offered by the build system. By this way, your project will be clean and you can focus more on feature development. On other side, build engineer have full responsibility and control on the build system.
buildscript {
ext.config = { key, defaultValue = null -> System.properties[key] ?: System.getenv()[key] ?: project.hasProperty(key) ? project.ext[key] : defaultValue }
apply from: config('buildscriptUrl') ?: "${config('mavenRepoUrl', 'https://jcenter.bintray.com/')}com/github/mrduguo/gradle/gradle-buildscript/${config('buildscriptVersion') ? "${config('buildscriptVersion')}/gradle-buildscript-${config('buildscriptVersion')}-buildscript.gradle" : 'buildscript.gradle'}"
}
apply plugin: 'com.github.mrduguo.gradle.buildscript'
Set the buildscriptVersion
variable via
- system properties
-DbuildscriptVersion=0.3.0-180126-113820-29d4090-50
- envrionment variables
export buildscriptVersion=0.3.0-180126-113820-29d4090-50
- gradle.properties
buildscriptVersion=0.3.0-180126-113820-29d4090-50
A package.json
or src/main/webapp/package.json
file will active the npm project support:
- automatically install nodejs version based on
package.json@engines.node
with nvm (except Windows) - manage
node_modules
life cycle - delete the folder and run
npm install
if anything change frompackage.json
- apply override from
config/override/node_modules
if exist npm
command bind- execute
npm run build
with default build command./gradlew
- execute
npm start
with when execute./gradlew run
- gradle-simplest-project - simplest project only contain build system
- gradle-sample-lib - library project which publish jar file
- gradle-sample-app - spring boot based app come with zone down time AWS deployment work flow
- gradle-sample-cmd - spring boot based command line app with docker support
- gradle-sample-react - react (UI) + spring boot (REST API)
- gradle-sample-cucumber - cucumber groovy based integration test
- JAVA 7 or newer
./gradlew
All projects, include this project itself, will do the full build by default. It will do as much as close to jenkins integration build.
./gradlew run
You may use the run
task on runnable project for local development. Such as:
- spring boot application - will run the application
- npm js application - will run the npm in watch mode for local development