-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
89 lines (75 loc) · 2.45 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
plugins {
id 'java-library'
id 'org.jetbrains.kotlin.jvm' version '1.7.10'
id 'maven-publish'
id 'signing'
}
repositories {
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.12'
}
java {
withJavadocJar()
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
def localProperties = new Properties()
localProperties.load(file("local.properties").newDataInputStream())
publishing {
publications{
mavenJava(MavenPublication){
groupId = 'io.github.nishain-de-silva'
artifactId = 'jsonpond'
version = '3.0.0'
from components.java
pom {
name = 'JSONPond'
description = 'JSON library to read and write properties in aesthetic way'
url = 'https://github.com/nishain-de-silva/JSONPond/tree/main'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'nishain'
name = 'Nishain De Silva'
}
}
scm {
connection = 'scm:git:git://nishain-de-silva/JSONPond.git'
developerConnection = 'scm:git:ssh://nishain-de-silva/JSONPond.git'
url = 'https://github.com/nishain-de-silva/JSONPond/'
}
}
}
}
repositories {
maven {
def release = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshot = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
name = 'OSSRH'
url = release
credentials {
username = localProperties['sonatypeUsername']
password = localProperties['sonatypePassword']
}
}
}
}
signing() {
def signingKey = localProperties["signingKey"]
def signingPassword = localProperties["signingPassword"]
useInMemoryPgpKeys(signingKey, file('secretkey.gpg').getText(), signingPassword)
sign publishing.publications.mavenJava
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}