-
Notifications
You must be signed in to change notification settings - Fork 33
/
build.gradle
83 lines (73 loc) · 2.32 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
subprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
group 'de.mkammerer'
version '2.11'
description 'Argon2 Binding for the JVM'
repositories {
mavenCentral()
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
compileJava {
options.compilerArgs.addAll(['--release', '6']);
}
java {
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
libs(MavenPublication) {
from components.java
pom(this.&configurePom)
}
}
repositories {
maven {
String releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
String snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = project.properties['sonatype.username']
password = project.properties['sonatype.password']
}
}
}
}
signing {
sign publishing.publications.libs
required { gradle.taskGraph.hasTask('publish') }
}
}
private def configurePom(org.gradle.api.publish.maven.MavenPom pom) {
pom.with {
name = 'Argon2 JVM'
description = 'Argon2 Binding for the JVM'
url = 'https://github.com/phxql/argon2-jvm'
packaging = 'jar'
licenses {
license {
name = 'GNU Lesser General Public License, Version 3'
url = 'https://www.gnu.org/licenses/lgpl-3.0.en.html'
}
}
developers {
developer {
id = 'phxql'
name = 'Moritz Kammerer'
email = '[email protected]'
url = 'https://www.mkammerer.de/'
}
}
scm {
connection = 'scm:git:git://github.com/phxql/argon2-jvm.git'
developerConnection = 'scm:git:git://github.com/phxql/argon2-jvm.git'
url = 'https://github.com/phxql/argon2-jvm'
}
}
}