-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
120 lines (110 loc) · 3.73 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
plugins {
id 'maven-publish'
id 'signing'
id 'org.jetbrains.kotlin.jvm' version '1.8.0'
}
group = 'io.github.obimp'
version = '0.1.7'
repositories {
mavenCentral()
maven {
url = uri('https://maven.pkg.github.com/obimp/obimp4j-core')
credentials {
username = project.findProperty('gpr.user') ?: System.getenv('GPR_USERNAME')
password = project.findProperty('gpr.key') ?: System.getenv('GPR_TOKEN')
}
}
}
compileKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8
}
compileTestKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8
}
java {
withSourcesJar()
withJavadocJar()
}
dependencies {
implementation 'io.github.obimp:obimp4j-core:0.1.9'
implementation 'org.bouncycastle:bctls-jdk18on:1.72'
testImplementation 'org.jetbrains.kotlin:kotlin-test'
}
test {
useJUnitPlatform()
}
publishing {
repositories {
maven {
name = 'OSSRH'
def releaseRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotRepoUrl : releaseRepoUrl
credentials {
username = project.findProperty('ossrh.user') ?: System.getenv('OSSRH_USERNAME')
password = project.findProperty('ossrh.key') ?: System.getenv('OSSRH_PASSWORD')
}
}
maven {
name = 'GithubPackages'
url = 'https://maven.pkg.github.com/obimp/obimp4j-client'
credentials {
username = project.findProperty('gpr.user') ?: System.getenv('GPR_USERNAME')
password = project.findProperty('gpr.key') ?: System.getenv('GPR_TOKEN')
}
}
}
publications {
mavenJava(MavenPublication) {
artifactId = 'obimp4j-client'
from(components.java)
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
//noinspection GroovyImplicitNullArgumentCall
fromResolutionResult()
}
}
pom {
name = 'OBIMP4J'
description = 'Java OBIMP (Open Binary Instant Messaging Protocol) implementation, client library.'
url = 'https://github.com/obimp/obimp4j-client'
licenses {
license {
name = 'The GNU General Public License v3.0'
url = 'https://www.gnu.org/licenses/gpl-3.0.txt'
}
}
developers {
developer {
id = 'libalex'
name = 'Alexander Krysin'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/obimp/obimp4j-client.git'
developerConnection = 'scm:git:ssh://github.com/obimp/obimp4j-client.git'
url = 'https://github.com/obimp/obimp4j-client'
}
}
}
}
}
signing {
if (System.properties['os.name'].toLowerCase(Locale.ROOT).contains('windows')) {
useGpgCmd()
} else {
def signingKey = findProperty('signingKey')
def signingPassword = findProperty('signingPassword')
useInMemoryPgpKeys(signingKey, signingPassword)
}
sign publishing.publications.mavenJava
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}