-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbuild.gradle
131 lines (109 loc) · 3.82 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
// Gradle Build File
// http://www.gradle.org
//
// For details on uploading to central, see Yennick Trevels excellent write-up at
// http://yennicktrevels.com/blog/2013/10/11/automated-gradle-project-deployment-to-sonatype-oss-repository/
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
group = 'de.rtner'
sourceCompatibility = 1.6
targetCompatibility = 1.6
version = '1.1.4'
configurations {
provided
}
sourceSets.main.java.srcDirs = [ 'src/main/java', 'src/jboss/java' ]
sourceSets.main.compileClasspath += configurations.provided
jar {
manifest {
attributes 'Implementation-Title': 'de.rtner.PBKDF2',
'Implementation-Version': version,
'Main-Class': 'de.rtner.security.auth.spi.PBKDF2Engine',
'url': 'http://www.rtner.de/software/PBKDF2.html'
}
}
javadoc {
classpath += configurations.provided
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
// Only provide signing and upload when respective (local) configuration is present
// Locally, this is defined in %USERPROFILE%\.gradle\gradle.properties
if( hasProperty('sonatypeUsername') ) {
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
// repository(url: "file://localhost/test-repo/")
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom.project {
name 'PBKDF2'
packaging 'jar'
description 'A free Java implementation of RFC 2898 / PKCS#5 PBKDF2'
url 'http://www.rtner.de/software/PBKDF2.html'
scm {
url '[email protected]:m9aertner/PBKDF2.git'
connection 'scm:git:[email protected]:m9aertner/PBKDF2.git'
developerConnection 'scm:git:[email protected]:m9aertner/PBKDF2.git'
}
licenses {
license {
name 'GNU Lesser General Public License (LGPL), Version 2.1'
url 'http://www.gnu.org/licenses/lgpl-2.1'
distribution 'repo'
}
}
developers {
developer {
id 'm9aertner'
name 'Matthias Gaertner'
}
}
}
}
}
}
}
repositories {
mavenCentral()
}
dependencies {
// Picketbox: JBoss Security for SaltedDatabaseServerLoginModule
compile 'org.picketbox:picketbox:4.0.21.Final'
// Undeclared dependency in Picketbox: org.jboss.logging.MessageBundle
// We do not want this dependency to show up in our pom, so we go "provided"
provided 'org.jboss.logging:jboss-logging:3.1.4.GA'
// JUnit
testCompile 'junit:junit:4.12'
}
test {
// Define to true to include ~ 30-second unit test testRFC6070_4
systemProperties 'pbkdf2.run.lengthy.test': 'false'
}
// For the signing process, create a gradle.properties file in %USERPROFILE%\.gradle with content:
//
// signing.keyId=617898B7
// signing.password=********************
// signing.secretKeyRingFile=C:/****/****/secring.gpg
//
// sonatypeUsername=********************
// sonatypePassword=********************
//
// then call "gradle uploadArchives"