Alexander Afanasyev | 8e9330f | 2016-01-25 19:13:40 -0800 | [diff] [blame] | 1 | buildscript { |
| 2 | repositories { |
| 3 | jcenter() |
| 4 | mavenCentral() |
| 5 | } |
| 6 | } |
| 7 | |
| 8 | apply plugin: 'java' |
| 9 | apply plugin: 'maven' |
| 10 | apply plugin: 'signing' |
| 11 | |
| 12 | group = 'com.intel.jndn.mock' |
andrewsbrown | d5cee6f | 2016-02-16 15:39:52 -0800 | [diff] [blame] | 13 | version = '1.0.0' |
Alexander Afanasyev | 8e9330f | 2016-01-25 19:13:40 -0800 | [diff] [blame] | 14 | |
| 15 | sourceCompatibility = JavaVersion.VERSION_1_7 |
| 16 | targetCompatibility = JavaVersion.VERSION_1_7 |
| 17 | compileJava.options.encoding = 'UTF-8' |
| 18 | |
| 19 | repositories { |
| 20 | jcenter() |
| 21 | mavenLocal() |
| 22 | mavenCentral() |
| 23 | } |
| 24 | |
| 25 | dependencies { |
andrewsbrown | 6d70028 | 2016-02-16 18:29:46 -0800 | [diff] [blame^] | 26 | compile 'net.named-data:jndn:0.10' |
Alexander Afanasyev | 8e9330f | 2016-01-25 19:13:40 -0800 | [diff] [blame] | 27 | testCompile 'junit:junit:4.12' |
| 28 | } |
| 29 | |
| 30 | task javadocJar(type: Jar) { |
| 31 | classifier = 'javadoc' |
| 32 | from javadoc |
| 33 | } |
| 34 | |
| 35 | task sourcesJar(type: Jar) { |
| 36 | classifier = 'sources' |
| 37 | from sourceSets.main.allSource |
| 38 | } |
| 39 | |
| 40 | tasks.withType(Test) { |
| 41 | reports.html.destination = file("${reporting.baseDir}/${name}") |
| 42 | testLogging { |
| 43 | events "passed", "skipped", "failed" |
| 44 | showStandardStreams = true |
| 45 | exceptionFormat = "full" |
| 46 | } |
| 47 | outputs.upToDateWhen { false } |
| 48 | } |
| 49 | |
| 50 | if (JavaVersion.current().isJava8Compatible()) { |
| 51 | allprojects { |
| 52 | tasks.withType(Javadoc) { |
| 53 | options.addStringOption('Xdoclint:none', '-quiet') |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | artifacts { |
| 59 | archives javadocJar, sourcesJar |
| 60 | } |
| 61 | |
| 62 | signing { |
| 63 | required { gradle.taskGraph.hasTask("uploadArchives") } |
| 64 | sign configurations.archives |
| 65 | } |
| 66 | |
| 67 | uploadArchives { |
| 68 | repositories { |
| 69 | mavenDeployer { |
| 70 | beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } |
| 71 | |
| 72 | repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { |
| 73 | try { |
| 74 | authentication(userName: ossrhUsername, password: ossrhPassword) |
| 75 | } |
| 76 | catch (Exception e) { |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { |
| 81 | try { |
| 82 | authentication(userName: ossrhUsername, password: ossrhPassword) |
| 83 | } |
| 84 | catch (Exception e) { |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | pom.project { |
| 89 | name 'jndn-mock' |
| 90 | packaging 'jar' |
| 91 | description 'Tools for testing NDN Java code without using network IO' |
| 92 | url 'https://github.com/01org/jndn-mock' |
| 93 | |
| 94 | scm { |
| 95 | connection 'scm:git:https://github.com/01org/jndn-mock' |
| 96 | developerConnection 'scm:git:https://github.com/01org/jndn-mock' |
| 97 | url 'https://github.com/01org/jndn-mock' |
| 98 | } |
| 99 | |
| 100 | licenses { |
| 101 | license { |
| 102 | name 'GNU Lesser General Public License, Version 3.0+' |
| 103 | url 'http://www.gnu.org/licenses/lgpl.html' |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | developers { |
| 108 | developer { |
| 109 | id 'andrewbrown' |
| 110 | name 'Andrew Brown' |
| 111 | url 'https://github.com/andrewsbrown' |
| 112 | } |
| 113 | developer { |
| 114 | id 'cawka' |
| 115 | name 'Alexander Afanasyev' |
| 116 | email 'aa@cs.ucla.edu' |
| 117 | } |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | } |