Skip to content

Commit 9518b8c

Browse files
jacek-poreda-sonarsourcetomverin
authored andcommitted
Add generation of sources and javadoc
1 parent 4ffd6fb commit 9518b8c

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
lines changed

build.gradle

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,24 @@ subprojects {
110110
includes(['**/*.java', '**/*.js', '**/*.ts', '**/*.tsx', '**/*.css'])
111111
}
112112

113+
tasks.withType(Javadoc) {
114+
options.addStringOption('Xdoclint:none', '-quiet')
115+
options.encoding = 'UTF-8'
116+
doFirst {
117+
options.addBooleanOption('-no-module-directories', true)
118+
}
119+
}
120+
121+
task sourcesJar(type: Jar, dependsOn: classes) {
122+
archiveClassifier = 'sources'
123+
from sourceSets.main.allSource
124+
}
125+
126+
task javadocJar(type: Jar, dependsOn: javadoc) {
127+
archiveClassifier = 'javadoc'
128+
from javadoc.destinationDir
129+
}
130+
113131
rootProject.tasks["sonarqube"].dependsOn jacocoTestReport
114132

115133
dependencyManagement {

sonar-plugin-api/build.gradle

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,34 @@ artifactoryPublish.skip = false
6565
publishing {
6666
publications {
6767
mavenJava(MavenPublication) {
68-
artifact source: shadowJar, classifier: null
69-
if (release) {
70-
artifact sourcesJar
71-
artifact javadocJar
68+
pom {
69+
name = project.name
70+
description = project.description
71+
url = 'http://www.sonarqube.org/'
72+
organization {
73+
name = 'SonarSource'
74+
url = 'http://www.sonarsource.com'
75+
}
76+
licenses {
77+
license {
78+
name = 'GNU LGPL 3'
79+
url = 'http://www.gnu.org/licenses/lgpl.txt'
80+
distribution = 'repo'
81+
}
82+
}
83+
scm {
84+
url = 'https://github.com/SonarSource/sonar-plugin-api'
85+
}
86+
developers {
87+
developer {
88+
id = 'sonarsource-team'
89+
name = 'SonarSource Team'
90+
}
91+
}
7292
}
93+
artifact source: shadowJar, classifier: null
94+
artifact sourcesJar
95+
artifact javadocJar
7396
}
7497
}
7598
}

0 commit comments

Comments
 (0)