-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaven-publishing.gradle
85 lines (74 loc) · 2.63 KB
/
maven-publishing.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
apply plugin: 'maven-publish'
apply plugin: 'java'
apply plugin: 'signing'
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
archiveClassifier.set('sources')
}
ext {
// some fields in nexus-publishing.gradle as required by publish-plugin
libraryName = 'dependencies-overview'
artifact = 'dependencies-overview'
localVersionSuffix = 'local'
// :bulb: keep sample-android-app/app/build.gradle in sync
libraryVersionString = Boolean.getBoolean("useLocalVersion") ? "$libraryVersion-$localVersionSuffix" : libraryVersion
libraryDescription = 'Generates project dependencies overview report (JSON, Markdown, etc.) from project dependencies'
siteUrl = 'https://github.com/vgaidarji/dependencies-overview'
gitUrl = 'https://github.com/vgaidarji/dependencies-overview.git'
gitUrlNoHttps = 'github.com/vgaidarji/dependencies-overview.git'
issuesUrl = 'https://github.com/vgaidarji/dependencies-overview/issues'
developerId = 'vgaidarji'
developerName = 'Veaceslav Gaidarji'
developerEmail = '[email protected]'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = publishedGroupId
artifactId = artifact
version = libraryVersionString
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = libraryName
description = libraryDescription
url = siteUrl
licenses {
license {
name = licenseName
url = licenseUrl
}
}
developers {
developer {
id = developerId
name = developerName
email = developerEmail
}
}
scm {
connection = "scm:git:git://$gitUrlNoHttps"
developerConnection = "scm:git:ssh://git@$gitUrlNoHttps"
url = gitUrl
}
}
}
}
}
signing {
// do no require signing on Circle CI
required { System.getenv("CIRCLECI") == "false" }
sign publishing.publications.mavenJava
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}