blob: 4e766226dfcae249c591191a27dfccd67a94ce2b [file] [log] [blame]
Alexander Afanasyevbae7c082015-03-13 18:01:39 -07001apply plugin: 'java'
2apply plugin: 'maven'
3apply plugin: 'signing'
4apply plugin: 'maven-publish'
5apply plugin: 'com.mattwhipple.emacs-jdee'
6
7group = 'net.named-data.jndn-xx'
8version = '0.0.1'
9sourceCompatibility = JavaVersion.VERSION_1_7
10
11repositories {
12 jcenter()
13 mavenLocal()
14 mavenCentral()
15}
16
17dependencies {
18 compile 'com.google.guava:guava:18+'
19 testCompile 'junit:junit:4.+'
20}
21
22buildscript {
23 repositories {
24 jcenter()
25 mavenCentral()
26 }
27 dependencies {
28 classpath 'com.mattwhipple.gradle:gradle-emacs-jdee:+'
29 }
30}
31
32task javadocJar(type: Jar) {
33 classifier = 'javadoc'
34 from javadoc
35}
36
37task sourcesJar(type: Jar) {
38 classifier = 'sources'
39 from sourceSets.main.allSource
40}
41
42artifacts {
43 archives javadocJar, sourcesJar
44}
45
46signing {
47 required { gradle.taskGraph.hasTask("uploadArchives") }
48 sign configurations.archives
49}
50
51uploadArchives {
52 repositories {
53 mavenDeployer {
54 beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
55
56 repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
57 try {
58 authentication(userName: ossrhUsername, password: ossrhPassword)
59 }
60 catch (Exception e) {
61 }
62 }
63
64 snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
65 try {
66 authentication(userName: ossrhUsername, password: ossrhPassword)
67 }
68 catch (Exception e) {
69 }
70 }
71
72 pom.project {
73 name 'jndn-cxx utilities'
74 packaging 'jar'
75 url 'https://github.com/cawka/jndn-xx-util'
76
77 scm {
78 connection 'scm:git:https://github.com/cawka/jndn-xx-util'
79 developerConnection 'scm:git:https://github.com/cawka/jndn-xx-util'
80 url 'https://github.com/cawka/jndn-xx-util'
81 }
82
83 licenses {
84 license {
85 name 'GNU Lesser General Public License, Version 3.0+'
86 url 'http://www.gnu.org/licenses/lgpl.html'
87 }
88 }
89
90 developers {
91 developer {
92 id 'cawka'
93 name 'Alexander Afanasyev'
94 email 'alexander.afanasyev@ucla.edu'
95 }
96 }
97 }
98 }
99 }
100}