forked from kohsuke/properjavardp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
72 lines (61 loc) · 1.43 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
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'eclipse'
version = "1.1-tweaked-0.4-SNAPSHOT"
group = "unoficial.net.propero"
archivesBaseName = "properjavardp"
sourceSets {
main {
java {
srcDir 'src'
}
resources {
srcDir "resources"
}
}
test {
java {
srcDir 'test'
}
}
}
repositories {
mavenLocal()
mavenCentral()
}
configurations {
mcdep
compile.extendsFrom(mcdep)
}
dependencies {
mcdep files('lib/java-getopt-1.0.13.jar') // woo, old java
compile "org.apache.logging.log4j:log4j-api:2.8.1"
compile "org.apache.logging.log4j:log4j-core:2.8.1"
compile "com.google.code.findbugs:jsr305:3.0.1"
mcdep "org.bouncycastle:bcprov-jdk15on:1.57"
testCompile "junit:junit:4.12"
testCompile "org.hamcrest:hamcrest-library:1.3"
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// Contains dependencies not present in MC
task mcdepJar(type: Jar) {
classifier = 'mcdep'
from { configurations.mcdep.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
exclude '**/log4j2.xml'
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar
archives mcdepJar
archives sourcesJar
}