Skip to content

Commit cb7e838

Browse files
authored
Merge pull request #21 from blackducksoftware/dev/BDRELENG-1849_redux
Update for publishing to Maven Central
2 parents 05771f3 + 53bbd09 commit cb7e838

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
plugins {
22
id 'com.autonomousapps.dependency-analysis' version '0.46.0'
33
id 'io.codearte.nexus-staging' version "0.21.1"
4-
id 'de.marcphilipp.nexus-publish' version "0.4.0"
54
}
65

76
allprojects {

method-analyzer-core/build.gradle

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins{
22
id 'maven-publish'
3+
id 'de.marcphilipp.nexus-publish' version "0.4.0"
34
}
45

56
description = 'Library which analyzes Java projects for method calls to external methods'
@@ -27,19 +28,20 @@ test {
2728
systemProperty 'com.synopsys.method.analyzer.test.project.dir', "${project(':method-analyzer-test-project').projectDir}"
2829
}
2930

30-
java{
31-
withJavadocJar()
32-
withSourcesJar()
33-
}
34-
3531
publishing {
3632
publications {
3733
maven(MavenPublication) {
3834
from components.java
39-
40-
//TODO romeara source artifacts
41-
//artifact project.sourcesJar
42-
//artifact project.javadocJar
35+
artifact javadocJar
36+
artifact sourcesJar
37+
versionMapping {
38+
usage('java-api') {
39+
fromResolutionOf('runtimeClasspath')
40+
}
41+
usage('java-runtime') {
42+
fromResolutionResult()
43+
}
44+
}
4345

4446
pom {
4547
name = project.name
@@ -70,4 +72,4 @@ publishing {
7072
}
7173
}
7274
}
73-
}
75+
}

0 commit comments

Comments
 (0)