-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
50 lines (40 loc) · 1.25 KB
/
build.gradle
File metadata and controls
50 lines (40 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
plugins {
id "base"
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
}
import org.apache.tools.ant.filters.ReplaceTokens
version = '1.0.19'
tasks.register('myClean', Delete) {
delete rootProject.layout.buildDirectory
}
tasks.register('updateVersion', Copy) {
dependsOn tasks.named('myClean')
from rootProject.layout.projectDirectory.file("src")
into rootProject.layout.buildDirectory.file(rootProject.name)
exclude('.project','.buildpath')
filter(ReplaceTokens, tokens: [plugin_name: rootProject.name, plugin_version: rootProject.version])
}
tasks.register('copyLicenceDetails', Copy) {
dependsOn tasks.named('updateVersion')
from(".") {
include "README.md"
include "LICENCE"
}
into rootProject.layout.buildDirectory.file(rootProject.name)
}
tasks.register('myzip',Zip) {
group "Archive"
description "Archives sources in a zip file"
dependsOn tasks.named('copyLicenceDetails')
from rootProject.layout.buildDirectory.file(rootProject.name)
into(rootProject.name)
include "*/**"
archiveFileName = (rootProject.name + "_" + rootProject.version + ".zip")
}
assemble.dependsOn myzip