Skip to content

GitHub-workflow-APP/java-gradle-3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gradle-multi-project-sample

sample repository to use gradle multi-project.

Overview

There are 3 sub pjojects.

  • common: utility library
  • base: base class or interface
  • app: application requires base or common
$ tree common/ base/ app/
common/
├── build.gradle
└── src
    └── main
        └── java
            └── common
                └── MyLibrary.java
base/
├── build.gradle
└── src
    └── main
        └── java
            └── base
                ├── MyBase.java
                └── MyInterface.java
app/
├── build.gradle
└── src
    └── main
        └── java
            └── app
                ├── Main.java
                └── MyApp.java

How to build

Build all sub projects.

$ ./gradlew build

Build common project only.

$ ./gradlew :common:build

Build a specific task in a sub project. For example app project has a task to build a Fat jar.

$ ./gradlew :app:customFatJar
$ java -jar app/build/libs/executable-1.0.jar
17:20:42.309 [main] INFO base.MyBase - called doSomeProcess in Base
17:20:42.310 [main] INFO common.MyLibrary - do some process
17:20:42.311 [main] INFO base.MyBase - log floor: 3
17:20:42.316 [main] INFO base.MyBase - f.getCumPct('Z'): 0.5

How to test

Run test for all sub projects.

$ ./gradlew --info cleanTest test

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy