-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·66 lines (56 loc) · 1.52 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
55
56
57
58
59
60
61
62
63
64
65
66
import org.gradle.api.artifacts.*
apply plugin: 'base' // To add "clean" task to the root project.
subprojects {
apply from: rootProject.file('common.gradle')
}
task mergedJavadoc(type: Javadoc, description: 'Creates Javadoc from all the projects.') {
title = 'All modules'
destinationDir = new File(project.buildDir, 'merged-javadoc')
// Note: The closures below are executed lazily.
source {
subprojects*.sourceSets*.main*.allSource
}
classpath.from {
subprojects*.configurations*.compile*.copyRecursive({ !(it instanceof ProjectDependency); })*.resolve()
}
}
if (!hasProperty('mainClass')) {
ext.mainClass = 'net.sourceforge.javydreamercsw.Main'
}
task copyToLibs(type: Copy) {
outputs.upToDateWhen { false }
into "$projectDir/libs"
from("ModePlugin1/build/libs"){
exclude '**/*sources*.jar'
}
from("ModePlugin2/build/libs"){
exclude '**/*sources*.jar'
}
from('UI/build/libs') {
exclude '**/UI*.jar'
}
}
task copyMain(type: Copy) {
outputs.upToDateWhen { false }
into "$projectDir"
from('UI/build/libs') {
include '**/UI*.jar'
exclude '**/UI*sources.jar'
}
}
clean.doFirst {
delete fileTree('${rootDir}') {
include '*.jar'
}
delete "${rootDir}/libs/"
}
build.finalizedBy('copyToLibs', 'copyMain', 'zip')
task zip(type: Zip) {
outputs.file('demo.zip')
from '.'
include 'UI-1.0-SNAPSHOT.jar'
include 'libs/*'
include 'run.bat'
include 'run.sh'
archiveName 'demo.zip'
}