jake
jake

Reputation: 679

gradle multiple jars from multiple folders

i have a project layout like

sample/
               A/
                  src/
                     main/
                        java/
                           A.java
                  res/
                     A.jpg
               B/
                  src/
                     main/
                        java/
                           B.java
                  res/
                     B.jpg
               build.gradle
               settings.gradle

how to create two separate jar files(A.jar/B.jar)

A.jar includes A.java, A.jpg

B.jar includes B.java, B.jpg

Upvotes: 0

Views: 430

Answers (1)

Opal
Opal

Reputation: 84874

Here you can find a sample project. Basically all configuration is put in build.gradle and settings.gradle files:

build.gradle

subprojects {
   apply plugin: 'java'
}

settings.gradle

include 'A', 'B'

Upvotes: 1

Related Questions