-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathrelease.gradle
79 lines (68 loc) · 2.45 KB
/
release.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
apply plugin: 'maven-publish'
apply plugin: 'signing'
archivesBaseName = project.findProperty('artifactId')
tasks.maybeCreate('sourceJar', Jar).configure {
from java.sourceSets.main.allJava
}
publishing {
repositories {
maven {
name = "Sonatype"
if (rootProject.version.contains("SNAPSHOT")) {
url "https://oss.sonatype.org/content/repositories/snapshots/"
} else {
url "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}
credentials {
username = project.hasProperty("NEXUS_USERNAME") ? "$NEXUS_USERNAME" : System.getenv("NEXUS_USERNAME")
password = project.hasProperty("NEXUS_PASSWORD") ? "$NEXUS_PASSWORD" : System.getenv("NEXUS_PASSWORD")
}
}
maven {
name 'test'
url rootProject.file('build/repository').toURI().toString()
}
}
publications {
Publication(MavenPublication) {
from project(':' + project.name).components.java
groupId 'com.bugsnag'
artifactId project.findProperty('artifactId')
version rootProject.version
artifact sourceJar {
classifier "sources"
}
pom {
name = project.findProperty('projectName')
description = project.findProperty('projectDescription')
url = 'https://github.com/bugsnag/bugsnag-java'
scm {
url = 'https://github.com/bugsnag/bugsnag-java'
connection = 'scm:git:git://github.com/bugsnag/bugsnag-java.git'
developerConnection = 'scm:git:ssh://[email protected]/bugsnag/bugsnag-java.git'
}
licenses {
license {
name = 'MIT'
url = 'http://opensource.org/licenses/MIT'
distribution = 'repo'
}
}
organization {
name = 'Bugsnag'
url = 'https://bugsnag.com'
}
developers {
developer {
id = 'loopj'
name = 'James Smith'
email = '[email protected]'
}
}
}
}
}
signing {
sign publishing.publications
}
}