-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
103 lines (90 loc) · 3.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'net.researchgate.release' version '3.0.0'
}
group 'io.github.vida-nyu'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
dependencies {
implementation group: 'com.esotericsoftware.kryo', name: 'kryo', version: '2.21'
implementation group: 'org.rocksdb', name: 'rocksdbjni', version: '6.2.2'
implementation group: 'org.iq80.leveldb', name: 'leveldb', version: '0.12'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}
test {
useJUnitPlatform()
}
java {
withJavadocJar()
withSourcesJar()
}
// Setup publishing to Maven repositories
publishing {
publications {
maven(MavenPublication) {
groupId = group
artifactId = rootProject.name
version = version
from components.java
pom {
name = 'KVDB4J'
description = 'A simple Java interface for multiple key-value stores.'
url = 'https://github.com/VIDA-NYU/kvdb4j'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name = 'Aécio Santos'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:[email protected]:VIDA-NYU/kvdb4j.git'
url = 'https://github.com/VIDA-NYU/kvdb4j'
}
}
}
}
repositories {
maven {
name = "OSSRH"
def snapshotsUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
def releasesUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
url = version.endsWith('SNAPSHOT') ? snapshotsUrl : releasesUrl
credentials {
username = project.findProperty("ossrhUsername") ?: System.getenv("OSSRH_USERNAME")
password = project.findProperty("ossrhPassword") ?: System.getenv("OSSRH_PASSWORD")
}
}
}
}
// Configure artifact signing (required for publishing to Sonatype maven repository)
signing {
//
// The following setup allows to pass the key identifier, secret key (in ascii-armored
// format), and the password using the following environment variables respectively:
// - ORG_GRADLE_PROJECT_signingKey
// - ORG_GRADLE_PROJECT_signingPassword
//
// Command line example for singing maven publication:
// ORG_GRADLE_PROJECT_signingKey=$(cat ~/.gnupg/kvdb4j.asc) \
// ORG_GRADLE_PROJECT_signingPassword=$SIGNING_KEY_PWD \
// gradle signMavenPublication
//
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
// Specify what should be signed (the maven publication)
sign publishing.publications.maven
}