forked from java-decompiler/jd-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
60 lines (52 loc) · 1.24 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
apply plugin: 'java'
apply plugin: 'distribution'
// Common configuration //
allprojects {
version='1.0.0'
apply plugin: 'eclipse'
apply plugin: 'idea'
tasks.withType(JavaCompile) {
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
}
tasks.withType(GroovyCompile) {
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
}
repositories {
mavenCentral()
}
}
// 'cleanIdea' task extension //
task fullCleanIdea {
new File(project.name + '.iws').delete()
ant.delete(dir: 'out')
}
fullCleanIdea.mustRunAfter cleanIdea
// All in one JAR //
subprojects.each { subproject ->
evaluationDependsOn(subproject.path)
}
jar {
dependsOn subprojects.tasks['classes']
manifest {
attributes 'Main-Class': 'jd.gui.App', 'SplashScreen-Image': 'images/Icon_java_128.png'
}
def deps = []
subprojects.each { subproject ->
from subproject.sourceSets.main.output.classesDir
from subproject.sourceSets.main.output.resourcesDir
deps += subproject.configurations.compile
}
from { deps.unique().collect { it.isDirectory() ? it : zipTree(it) } }
}
// Distribution for OSX //
distributions {
osx {
contents {
into('JD-GUI.app/Contents/Resources/Java') {
from { fileTree('build/libs') { include 'jd-gui-*.jar' } }
}
}
}
}