Gradle Archive Tasks

From NovaOrdis Knowledge Base
Revision as of 22:18, 20 May 2018 by Ovidiu (talk | contribs) (Created page with "=External= * https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.html =Internal= * Gradle Task =Overview=...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

External

Internal

Overview

Zip

https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Zip.html

Zip assembles a ZIP archive. The default is to compress the content of the ZIP.

task dist(type: Zip) {
    dependsOn spiJar
    from 'src/dist'
    into('libs') {
        from spiJar.archivePath
        from configurations.runtime
    }
}

Jar

https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html

Jar assembles a JAR archive.

task myJar(type: Jar) {
   ....
}
task srcJar(type: Jar) {
   from sourceSets.main.allJava
}