-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
124 lines (106 loc) · 3.63 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
plugins {
id "com.jfrog.bintray" version "1.7.3"
id 'net.researchgate.release' version '2.4.0'
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
repositories {
jcenter()
}
ext {
bytemanJunitRulesVersion = '1.0.3'
bytemanVersion = '3.0.6'
mockitoVersion = '1.9.5'
scmUrl = 'https://github.com/mahnkong/sslkeylogger-byteman-helper'
projectDescription = 'This project contains a Byteman helper class and a rule providing functionality to log SSL connection keys in a format used by wireshark to decrypt SSL Traffic.'
}
configurations {
byteman
}
dependencies {
compile "org.jboss.byteman:byteman:${bytemanVersion}"
compile 'org.slf4j:slf4j-simple:1.7.21'
testCompile "com.github.mahnkong:byteman-junit-rules:${bytemanJunitRulesVersion}"
byteman "org.jboss.byteman:byteman-download:${bytemanVersion}:bin@zip"
testCompile 'junit:junit:4.12'
testCompile "org.mockito:mockito-all:${mockitoVersion}"
}
task prepareByteman(type: Copy) {
from zipTree (configurations.byteman.files.first())
into buildDir
}
test {
dependsOn("prepareByteman")
environment 'BYTEMAN_HOME', "${buildDir}${File.separator}byteman-download-${bytemanVersion}"
forkEvery 1
}
jar {
from "LICENSE"
}
release {
tagTemplate = 'v${version}'
git {
requireBranch = /master|release.*/
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
artifacts(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom.withXml {
asNode().appendNode('name', project.name)
asNode().appendNode('description', project.ext.projectDescription)
asNode().appendNode('url', project.ext.scmUrl)
asNode().appendNode('scm').
appendNode('url', project.ext.scmUrl).parent().
appendNode('connection', "scm:git:${project.ext.scmUrl}.git")
asNode().appendNode('licenses').appendNode('license').
appendNode('name', 'Apache License, Version 2.0').parent().
appendNode('url', 'http://www.apache.org/licenses/LICENSE-2.0.html')
asNode().appendNode('developers').appendNode('developer').
appendNode('id', 'mahnkong')
}
}
}
repositories {
mavenLocal()
}
}
// https://github.com/bintray/gradle-bintray-plugin
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['artifacts']
pkg {
repo = "maven"
// it is the name that appears in bintray when logged
name = project.name
websiteUrl = project.ext.scmUrl
vcsUrl = project.ext.scmUrl
licenses = ["Apache-2.0"]
publish = true
version {
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
passphrase = System.getenv("BINTRAY_GPG_PASSWORD") //Optional. The passphrase for GPG signing'
}
mavenCentralSync {
sync = true //Optional (true by default). Determines whether to sync the version to Maven Central.
user = System.getenv("BINTRAY_USER") //OSS user token
password = System.getenv("BINTRAY_OSS_PASSWORD") //OSS user password
}
}
}
}
bintrayUpload.dependsOn('test')