-
Notifications
You must be signed in to change notification settings - Fork 5
/
publish-helper.gradle
73 lines (73 loc) · 2.02 KB
/
publish-helper.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
// Dieses GradleSkript gibt die Publishing-Definition für Java-Artefakte vor
// Gradle Module können dies dann Nutzen und einzelne Informationen überschreiben
// um Redundanz vorzubeugen, bspw:
/*
apply from: "$rootDir/publish-helper.gradle"
publishing {
publications {
publishJava(MavenPublication) {
artifactId = 'svws-server-app'
pom {
name = 'SVWS Server Application'
description = 'Diese Bibliothek enthält den Java-Server für die Schulverwaltungssoftware in NRW'
}
}
}
}
*/
publishing {
publications {
publishJava(MavenPublication) {
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'name'
description = 'description'
url = 'http://www.svws.nrw.de'
licenses {
license {
name = 'BSD-3-Clause'
url = 'https://opensource.org/licenses/BSD-3-Clause'
}
}
scm {
connection = 'scm:[email protected]/SVWS-NRW/SVWS-Server'
developerConnection = 'scm:[email protected]/SVWS-NRW/SVWS-Server.git'
url = 'https://github.com/SVWS-NRW/SVWS-Server.git'
}
developers {
developer {
id = 'svws-nrw'
name = 'Schulverwaltung NRW'
email = '[email protected]'
}
}
}
}
}
}
//Signing Jars
task signJar(){
dependsOn 'assemble'
group 'publishing'
description '.jar-Files signieren'
doLast{
println ":$project.name:${name}"
ant.signjar(
jar: 'build/libs/*.jar',
alias:jarsign_keyalias,
storetype:"pkcs12",
keystore:jarsign_keystoreFile,
storepass:jarsign_keystorepass,
verbose:true,
preservelastmodified:"true"
)
}
}