blob: 7ef831f197675dd0ca60842ca9287e54427f4e6a [file] [log] [blame]
Alexander Afanasyev8e9330f2016-01-25 19:13:40 -08001buildscript {
2 repositories {
3 jcenter()
4 mavenCentral()
5 }
6}
7
8apply plugin: 'java'
9apply plugin: 'maven'
10apply plugin: 'signing'
11
12group = 'com.intel.jndn.mock'
andrewsbrownd5cee6f2016-02-16 15:39:52 -080013version = '1.0.0'
Alexander Afanasyev8e9330f2016-01-25 19:13:40 -080014
15sourceCompatibility = JavaVersion.VERSION_1_7
16targetCompatibility = JavaVersion.VERSION_1_7
17compileJava.options.encoding = 'UTF-8'
18
19repositories {
20 jcenter()
21 mavenLocal()
22 mavenCentral()
23}
24
25dependencies {
andrewsbrown6d700282016-02-16 18:29:46 -080026 compile 'net.named-data:jndn:0.10'
Alexander Afanasyev8e9330f2016-01-25 19:13:40 -080027 testCompile 'junit:junit:4.12'
28}
29
30task javadocJar(type: Jar) {
31 classifier = 'javadoc'
32 from javadoc
33}
34
35task sourcesJar(type: Jar) {
36 classifier = 'sources'
37 from sourceSets.main.allSource
38}
39
40tasks.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
50if (JavaVersion.current().isJava8Compatible()) {
51 allprojects {
52 tasks.withType(Javadoc) {
53 options.addStringOption('Xdoclint:none', '-quiet')
54 }
55 }
56}
57
58artifacts {
59 archives javadocJar, sourcesJar
60}
61
62signing {
63 required { gradle.taskGraph.hasTask("uploadArchives") }
64 sign configurations.archives
65}
66
67uploadArchives {
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}