-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
87 lines (76 loc) · 2.54 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
plugins {
id 'signing'
id('io.github.gradle-nexus.publish-plugin') version '2.0.0'
}
allprojects {
group 'com.avast.hashes'
version = version == 'unspecified' ? 'DEVELOPER-SNAPSHOT' : version
}
ext {
circeVersion = '0.14.10'
}
nexusPublishing {
repositories {
sonatype()
}
}
subprojects {
apply plugin: 'scala'
apply plugin: 'java-library'
apply plugin: 'signing'
apply plugin: 'maven-publish'
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
dependencies {
api "org.scala-lang:scala-library:${scalaLibraryVersion}"
testImplementation "org.scalatest:scalatest_${scalaVersion}:3.3.0-SNAP3"
testImplementation "org.scalatestplus:junit-4-12_${scalaVersion}:3.1.3.0"
testImplementation "junit:junit:4.13.2"
}
java {
withJavadocJar()
withSourcesJar()
}
afterEvaluate {
publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)
artifactId = archivesBaseName
pom {
name = 'Scala Hashes'
description = 'Case-classes representing MD5, SHA1 and SHA256.'
url = 'https://github.com/avast/scala-hashes'
licenses {
license {
name = 'The MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
id = 'augi'
name = 'Michal Augustýn'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/avast/scala-hashes.git'
developerConnection = 'scm:git:ssh://github.com/avast/scala-hashes.git'
url = 'https://github.com/avast/scala-hashes'
}
}
}
}
}
}
signing {
String base64Key = System.getenv('SIGNING_KEY')
if (base64Key) {
useInMemoryPgpKeys(new String(Base64.decoder.decode(base64Key)), System.getenv('SIGNING_PASSWORD'))
sign publishing.publications
}
}
}