forked from corda/noise-java
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
138 lines (119 loc) · 3.45 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
buildscript {
repositories {
jcenter()
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
}
}
plugins {
//To publish locally
id "maven"
//To publish to Bintray
id "com.jfrog.bintray" version "1.8.4"
id "maven-publish"
id "io.freefair.javadoc-links" version "3.8.4" apply false // Make JavaDocs link back to the main Java docs.
id "org.jetbrains.kotlin.jvm" version "1.3.41" apply false // Kotlin language support.
}
group 'io.emeraldpay.noise'
version '1.0'
// Common build logic I carry around with me, configures the plugins above and commonly useful dependencies.
apply from: "precanned.gradle"
java {
sourceCompatibility = JavaVersion.VERSION_1_9
targetCompatibility = JavaVersion.VERSION_1_9
modularity.inferModulePath.set(true)
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
def pomConfig = {
licenses {
license {
name "MIT License"
url "https://opensource.org/licenses/MIT"
distribution "repo"
}
}
developers {
developer {
id "rweather"
name "Rhys Weatherley"
email "rhys.weatherley@gmail.com"
}
developer {
id "mikehearn"
name "Mike Hearn"
email "mike@r3.com"
}
developer {
id "splix"
name "Igor Artamonov"
email "igor@artamonov.ru"
}
}
scm {
connection "scm:git:git://github.com/emeraldpay/noise-java.git"
developerConnection "scm:git:git://github.com/emeraldpay/noise-java.git"
url "https://github.com/emeraldpay/noise-java"
}
}
publishing {
publications {
NoisePublication(MavenPublication) {
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
groupId project.group
artifactId project.name
version project.version
pom.withXml {
def root = asNode()
root.appendNode('name', 'Noise Protocol for Java')
root.children().last() + pomConfig
}
}
}
}
bintray {
user = System.getProperty('bintrayUser') ? System.getProperty('bintrayUser') : System.getenv('BINTRAY_USER')
key = System.getProperty('bintrayApiKey') ? System.getProperty('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
publications = ['NoisePublication']
dryRun=false
publish=true
override=true
pkg {
userOrg = 'emerald'
repo = 'noise-java'
name = project.name
licenses = ['MIT']
vcsUrl = 'https://github.com/emeraldpay/noise-java.git'
labels = ['noise', 'protocol', 'cryptography']
publicDownloadNumbers = true
version {
name = project.version
description = 'Noise Protocol for Java'
released = new Date()
vcsTag = project.version
gpg {
sign = true
}
}
}
}