Use archivesBaseName when publishing. (#809)
* Use archivesBaseName when publishing. * Fix auto name
This commit is contained in:
parent
3a24611d4a
commit
91f8e8c199
|
@ -15,6 +15,11 @@ byteBuddy {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO(anuraaga): This needs to be added before adding publish.gradle, clean up this ordering restraint.
|
||||
afterEvaluate {
|
||||
archivesBaseName = 'opentelemetry-auto-' + archivesBaseName
|
||||
}
|
||||
|
||||
apply from: "$rootDir/gradle/java.gradle"
|
||||
if (project.ext.find("skipPublish") != true) {
|
||||
apply from: "$rootDir/gradle/publish.gradle"
|
||||
|
@ -22,8 +27,6 @@ if (project.ext.find("skipPublish") != true) {
|
|||
|
||||
|
||||
afterEvaluate {
|
||||
archivesBaseName = 'opentelemetry-auto-' + archivesBaseName
|
||||
|
||||
byteBuddy {
|
||||
transformation {
|
||||
tasks = ['compileJava', 'compileScala', 'compileKotlin']
|
||||
|
|
|
@ -19,7 +19,9 @@ publishing {
|
|||
from components.java
|
||||
}
|
||||
|
||||
artifactId = artifactPrefix(project) + artifactId
|
||||
afterEvaluate {
|
||||
artifactId = artifactPrefix(project, archivesBaseName) + archivesBaseName
|
||||
}
|
||||
|
||||
pom {
|
||||
name = 'OpenTelemetry Instrumentation for Java'
|
||||
|
@ -57,7 +59,10 @@ publishing {
|
|||
}
|
||||
}
|
||||
|
||||
private String artifactPrefix(Project p) {
|
||||
private String artifactPrefix(Project p, String archivesBaseName) {
|
||||
if (archivesBaseName.startsWith("opentelemetry")) {
|
||||
return ''
|
||||
}
|
||||
if (p.name.startsWith("opentelemetry")) {
|
||||
return ''
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue