forked from tterrag1098/BON2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
63 lines (52 loc) · 1.59 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
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'idea'
version = "2.4.0.16"
group = "com.github.parker8283"
archivesBaseName = "BON"
repositories {
mavenCentral()
}
dependencies {
compile 'org.ow2.asm:asm-debug-all:5.0.4'
compile 'com.google.guava:guava:18.0'
compile 'net.sf.jopt-simple:jopt-simple:4.9'
compile group: 'com.google.code.gson', name: 'gson', version: '2.7'
compile group: 'net.sf.trove4j', name: 'trove4j', version: '3.0.3'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.7'
}
task copyAndReplace(type: Copy) {
from(sourceSets.main.java) {
include '**/BON2.java'
expand 'DEV': project.version
}
from(sourceSets.main.java) {
exclude '**/BON2.java'
}
into project.getBuildDir().toString() + "/sources/java"
}
tasks.compileJava.dependsOn copyAndReplace
tasks.compileJava.setSource(project.getBuildDir().toString() + '/sources/java')
def commonManifest = {
attributes 'Main-Class': 'com.github.parker8283.bon2.BON2',
'Implementation-Title': 'Bearded Octo Nemesis 2',
'Implementation-Version': project.version,
'Built-With': 'Gradle v' + project.getGradle().getGradleVersion()
}
jar {
manifest commonManifest
classifier = 'bin'
}
task fatJar(type: Jar, dependsOn: 'jar') {
inputs.file jar.archivePath
from(configurations.compile.collect { zipTree(it).matching { exclude 'META-INF/**' } })
manifest commonManifest
classifier = 'all'
}
fatJar.doFirst {
from zipTree(jar.archivePath)
}
artifacts {
archives fatJar
}