-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathbuild.gradle
More file actions
109 lines (95 loc) · 2.86 KB
/
build.gradle
File metadata and controls
109 lines (95 loc) · 2.86 KB
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
plugins {
id 'org.graalvm.buildtools.native' version '0.10.5' apply false
id 'org.sonarqube' version '3.0' apply false
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'org.graalvm.buildtools.native'
group 'de.mkammerer'
version '2.12'
description 'Argon2 Binding for the JVM'
repositories {
mavenCentral()
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
compileJava {
// The generated bytecode is for a 1.6 JVM
options.release = 6
}
java {
toolchain {
// We need a JDK 11 to build argon2-jvm
languageVersion.set(JavaLanguageVersion.of(11))
}
withJavadocJar()
withSourcesJar()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.12.0'
testImplementation 'org.assertj:assertj-core:3.27.3'
}
test {
useJUnitPlatform()
}
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') }
}
graalvmNative {
binaries {
main {
buildArgs.add('--allow-incomplete-classpath')
}
}
}
}
private def configurePom(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 Halbritter'
email = 'halbritter.moritz@gmail.com'
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'
}
}
}