Thursday, December 27, 2012

How to Include Source Files into JAR in Gradle

Project structure:
├── build.gradle
└── src
    └── main
        └── java
            └── test
                └── Test.java
build.gradle
apply plugin: "java"

defaultTasks = ["clean", "jar"]

jar {
    from sourceSets.main.allJava
}

No comments:

Post a Comment