This is the ‘’‘build.gradle’’’:
apply plugin: 'distribution'
ext.archivesBaseName = "my-plugin"
version = "1.0"
task myPluginTar(type: Tar) {
baseName
= archivesBaseName
includeEmptyDirs = false
classifier
= 'myplugin'
from('.') {
include 'plugin1.txt'
include 'plugin2.txt'
}
destinationDir(libsDir)
}
artifacts {
archives myPluginTar
}
distributions {
myplugin {
baseName = archivesBaseName+"-myplugin"
contents {
from(libsDir) {
include myPluginTar.archiveName
}
}
}
}
mypluginDistTar {
compression = Compression.GZIP
}
Run: ‘’‘gradle assemble’’’
Under Gradle 2.2.1, it creates:
.
├── build
│ └── libs
│
└── my-plugin-1.0-myplugin.tar
...
Under Gradle 2.3, it creates:
.
├── build
│ ├── distributions
│ │ ├── my-plugin-myplugin-1.0.tgz
│ │ └── my-plugin-myplugin-1.0.zip
│ └── libs
│
└── my-plugin-1.0-myplugin.tar
...
There are two noticeable differences: 1. The gradle 2.3 assemble task not only assembles the artifacts, it also builds the distribution, is this expected with 2.3? 2. The gradle 2.3 assemble task builds both the tgz and the zip, is this expected with 2.3?
The release notes say that the application plugin leverages the distribution plugin, but I did not take that to mean that the distribution plugin had changed too. If that’s the case, please update the release notes to clarify. Thank you.