-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·103 lines (85 loc) · 2.22 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// Flightpath - build file
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
name = 'Forge'
url = 'http://files.minecraftforge.net/maven'
}
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
}
}
repositories {
mavenCentral()
jcenter()
maven {
name = 'Forge'
url = 'http://files.minecraftforge.net/maven'
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse' // I don't use it but meh, others might!
apply plugin: 'com.github.johnrengelman.shadow'
sourceCompatibility = 1.6
group = 'io.drakon'
version = FLIGHTPATH_VERSION
configurations {
shade
compile.extendsFrom shade
}
dependencies {
compile group: 'com.google.code.findbugs', name: 'jsr305', version: '1.3.9'
compile group: 'net.minecraftforge', name: 'forge', version: FORGE_VERSION, classifier: 'universal'
compile group: 'com.google.guava', name: 'guava', version: '17.0' // required for ASM data table
shade group: 'org.javassist', name: 'javassist', version: '3.21.0-GA'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
// Disable Javadoc doclint on JVM 1.8
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
jar {
manifest {
attributes 'Flightpath-Version': version
}
}
shadowJar {
classifier = "all"
configurations = [project.configurations.shade]
def REPACK_PACKAGE = 'io.drakon.flightpath.repack'
relocate 'javassist', "${REPACK_PACKAGE}.javassist"
}
task sourceJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourceJar
archives javadocJar
archives shadowJar
}
// Maven
apply plugin: 'maven'
if (!project.hasProperty("DEPLOY_DIR")) {
ext.DEPLOY_DIR = null
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://${DEPLOY_DIR}")
}
}
}
uploadArchives.onlyIf { return DEPLOY_DIR != null }