forked from java-decompiler/jd-eclipse
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
54 lines (47 loc) · 1.11 KB
/
build.gradle
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
51
52
53
54
apply plugin: 'distribution'
apply plugin: 'maven-publish'
subprojects.each { subproject ->
evaluationDependsOn(subproject.path)
}
import org.apache.tools.ant.filters.*
task('filterCopy', type: Copy) {
from 'org.jd.ide.eclipse.site'
into buildDir
include 'site.xml'
filter(ReplaceTokens, tokens: [VERSION : project.version])
}
distributions {
distZip {
// Create JAR files before final ZIP file
dependsOn subprojects.tasks['jar']
// For each file, remove root directory
eachFile { file ->
String path = file.relativePath
file.setPath(path.substring(path.indexOf('/')+1, path.length()))
}
}
main {
contents {
into('features') {
from {
fileTree 'org.jd.ide.eclipse.feature/build/libs'
}
}
into('plugins') {
from {
fileTree 'org.jd.ide.eclipse.plugin/build/libs'
}
}
from "$buildDir/site.xml", 'LICENSE', 'NOTICE', 'README.md'
}
}
}
distZip.dependsOn 'filterCopy'
publishing {
publications {
myDistribution(MavenPublication) {
groupId = 'com.github.nbauma109'
artifact distZip
}
}
}