forked from fornwall/jelf
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
81 lines (72 loc) · 1.66 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
plugins {
id "com.jfrog.bintray" version "1.7"
}
repositories {
jcenter()
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}
test {
afterTest { desc, result ->
println "Test ${desc.name} [${desc.className}] result: ${result.resultType}"
}
}
def pomConfig = {
licenses {
license {
name 'The MIT License'
url 'https://opensource.org/licenses/MIT'
distribution 'repo'
}
}
developers {
developer {
id 'fornwall'
name 'Fredrik Fornwall'
email '[email protected]'
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
// See https://github.com/bintray/gradle-bintray-plugin
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId 'net.fornwall.jelf'
artifactId 'jelf'
version '0.2'
pom.withXml {
def root = asNode()
root.appendNode('description', 'ELF parsing library in java')
root.appendNode('name', 'JElf')
root.appendNode('url', 'https://github.com/fornwall/jelf')
root.children().last() + pomConfig
}
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
publications = ['MyPublication']
pkg {
repo = 'maven'
userOrg = user
name = 'jelf'
labels = ['java', 'elf']
}
}