forked from Matroska-Org/jebml
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
86 lines (77 loc) · 1.77 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
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'checkstyle'
apply plugin: 'osgi'
apply plugin: 'maven-publish'
project.version = '2.4.4'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile 'org.slf4j:slf4j-api:1.7.5'
testCompile 'junit:junit:4.11'
testCompile 'org.mockito:mockito-core:1.9.+'
testRuntime 'ch.qos.logback:logback-classic:1.1.2'
}
checkstyleMain {
configFile = file("tools/csMain.xml")
}
checkstyleTest {
configFile = file("tools/csMain.xml")
}
// Workaround so that packageinfo files get included for OSGi package versions
sourceSets {
main {
resources.srcDirs = java.srcDirs
output.resourcesDir = output.classesDirs.first()
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
}
javadoc {
failOnError = false
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
}
publishing {
publications {
"${project.name}Jar"(MavenPublication) {
from components.java
artifactId project.name
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
}
}
if (project.hasProperty("maven_url")) {
repositories {
maven {
url maven_url
credentials(PasswordCredentials) {
username = maven_user
password = maven_password
}
}
}
}
}
jar {
manifest {
instructions << [
'Bundle-Name' : 'JEBML',
'Bundle-Version': version,
'Bundle-License': 'LGPLv2',
'Export-Package': 'org.ebml.*;-split-package:=merge-first',
'Import-Package': '*;resolution:=optional',
'-nodefaultversion': true,
'-noee': true,
'majorMinor' : 1
]
}
}