BC/S gradle plugin
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
LICENSE
README.md
build.gradle

README.md

Getting Started

This is a gradle plugin which could be used to facilitate BC/S web application development.

  1. Generate project folders automatically.
  2. Download and compile third party source code and add the generated jar file as project dependency.
  3. Init git repository and add git remote to it. In theory, other CVS could be supported but the function is not implemented
  4. Generate README.txt and LICENSE.
  5. Download required js and css based on the configuration
  6. Install node,npm and grunt. Integrate grunt into the project tasks to generate prod js and css.
  7. Java,Javaweb,Android or Hadoop configuration could be mixed together in build.gradle.
  8. Automatically generate test files in "src/test" directory base on the methods of each source files.

How to use

Currently, this plugin could be used in MacOS and Linux. It's not tested in Windows. The plugin must be applied after plugin 'java','war',etc as it will use the plugins which have been applied to the project to check which type the project is(java,javaweb,android).

Build script snippet for plugins DSL for Gradle 2.1 and later: plugins {
    id 'java'
    id "com.windfish.gradle.lazyfish" version "1.0.62"
}

Build script snippet for use in older Gradle versions or where dynamic configuration is required:
buildscript {
    repositories {
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath "com.windfish.gradle.lazyfish:lazyfish-gradle-plugin:1.0.62"
    }
}

apply plugin: "com.windfish.gradle.lazyfish"

License

Apache-2.0

Example

apply plugin:'war'
apply plugin:'com.windfish.gradle.lazyfish'

javaweb {
    dependencies=[
        'ali':'com.alipay.sdk:alipay-sdk-java:3.3.4.ALL',
    ]
    testDependencies=[
        'mockito': 'org.mockito:mockito-core:1.+',
    ]
    zipDependencies=[
        wxpay:"https://pay.weixin.qq.com/wiki/doc/api/download/WxPayAPI_JAVA.zip",
    ]
    jsDependencies=[
        vue:"https://cdn.jsdelivr.net/npm/vue/dist/vue.js",
    ]
    cssDependencies=[
        "font-awesome":"http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css",
    ]
    license='Apache-2.0'
    vcsType='git'
    vcsRemotes=[remote:'']
    addReadme=true
    directories=[:]
    mirrorToTest=true
    testFramework='spock'
    mirrorFilter={
        exclude "/JarUtils.java"
        include "
"
    }
    node{
        version='10.13.0'
    }
    grunt{
        gruntVersion = '1.0.2'
    }
}