Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 643 Bytes

File metadata and controls

32 lines (25 loc) · 643 Bytes

Gradle builds

Smart and useful code for building projects with Gradle.

Generate Javadoc JAR

Note: tested with jitpack.io - visit /javadoc to see the docs on jitpack

Add the following to your build.gradle:

task javadocJar(type: Jar, dependsOn: javadoc) {
    classifier = 'javadoc'
    from javadoc.destinationDir
}

artifacts {
    archives javadocJar
}

Generate Java sources JAR

Add the following to your build.gradle:

task sourcesJar(type: Jar, dependsOn: classes) {
    classifier = 'sources'
    from sourceSets.main.allSource
}

artifacts {
    archives sourcesJar
}