Skip to content

a centralized adaptive build system provided by gradle buildscript

Notifications You must be signed in to change notification settings

mrduguo/gradle-buildscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Centralized Adaptive Build System Build Status

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.

Your Project build.gradle To Use 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'

Use a released version

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

Languages Support

javascript - npm based project

A package.json or src/main/webapp/package.json file will active the npm project support:

  1. automatically install nodejs version based on package.json@engines.node with nvm (except Windows)
  2. manage node_modules life cycle
  3. delete the folder and run npm install if anything change from package.json
  4. apply override from config/override/node_modules if exist
  5. npm command bind
  6. execute npm run build with default build command ./gradlew
  7. execute npm start with when execute ./gradlew run

Sample Projects

The Only Requirement

  • JAVA 7 or newer

Standard Commands

Build Locally

./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.

Run Locally

./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

About

a centralized adaptive build system provided by gradle buildscript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages