-
Notifications
You must be signed in to change notification settings - Fork 22
/
publish.gradle
63 lines (57 loc) · 2.37 KB
/
publish.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
apply plugin: 'maven-publish'
apply plugin: 'signing'
ext.isReleaseVersion = !version.endsWith('SNAPSHOT')
publishing {
publications {
javaOSSRH(MavenPublication) {
groupId = rootProject.group
artifactId = project.name
version = rootProject.version
from components.java
pom {
name = 'inventory-framework'
description = 'Inventory Framework is a Bukkit Inventory API framework that allows you to create custom inventories with varied interaction treatments'
url = 'https://github.com/DevNatan/inventory-framework'
inceptionYear = '2020'
licenses {
license {
name = 'MIT License'
url = 'https://github.com/DevNatan/inventory-framework/blob/main/LICENSE'
}
}
developers {
developer {
name.set('Natan Vieira do Nascimento')
email.set('natanvnascimento@gmail.com')
url.set('https://github.com/DevNatan')
}
}
scm {
connection = 'scm:git:git:github.com/DevNatan/inventoryframework.git'
developerConnection = 'scm:git:https://github.com/DevNatan/inventoryframework.git'
url = 'https://github.com/DevNatan/inventoryframework'
}
}
}
}
repositories {
maven {
name = "OSSRH"
url = isReleaseVersion
? "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
: "https://s01.oss.sonatype.org/content/repositories/snapshots/"
credentials {
username = project.findProperty('ossrh.username') ?: System.getenv('OSSRH_USERNAME')
password = project.findProperty('ossrh.password') ?: System.getenv('OSSRH_PASSWORD')
}
}
}
}
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask('uploadArchives') }
useInMemoryPgpKeys(
project.findProperty('signing.keyId') ?: System.getenv('OSSRH_SIGNING_KEY'),
project.findProperty('signing.password') ?: System.getenv('OSSRH_SIGNING_PASSWORD')
)
sign publishing.publications.javaOSSRH
}