Alexander Afanasyev | bae7c08 | 2015-03-13 18:01:39 -0700 | [diff] [blame^] | 1 | apply plugin: 'java' |
| 2 | apply plugin: 'maven' |
| 3 | apply plugin: 'signing' |
| 4 | apply plugin: 'maven-publish' |
| 5 | apply plugin: 'com.mattwhipple.emacs-jdee' |
| 6 | |
| 7 | group = 'net.named-data.jndn-xx' |
| 8 | version = '0.0.1' |
| 9 | sourceCompatibility = JavaVersion.VERSION_1_7 |
| 10 | |
| 11 | repositories { |
| 12 | jcenter() |
| 13 | mavenLocal() |
| 14 | mavenCentral() |
| 15 | } |
| 16 | |
| 17 | dependencies { |
| 18 | compile 'com.google.guava:guava:18+' |
| 19 | testCompile 'junit:junit:4.+' |
| 20 | } |
| 21 | |
| 22 | buildscript { |
| 23 | repositories { |
| 24 | jcenter() |
| 25 | mavenCentral() |
| 26 | } |
| 27 | dependencies { |
| 28 | classpath 'com.mattwhipple.gradle:gradle-emacs-jdee:+' |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | task javadocJar(type: Jar) { |
| 33 | classifier = 'javadoc' |
| 34 | from javadoc |
| 35 | } |
| 36 | |
| 37 | task sourcesJar(type: Jar) { |
| 38 | classifier = 'sources' |
| 39 | from sourceSets.main.allSource |
| 40 | } |
| 41 | |
| 42 | artifacts { |
| 43 | archives javadocJar, sourcesJar |
| 44 | } |
| 45 | |
| 46 | signing { |
| 47 | required { gradle.taskGraph.hasTask("uploadArchives") } |
| 48 | sign configurations.archives |
| 49 | } |
| 50 | |
| 51 | uploadArchives { |
| 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 | } |