mirror of
https://github.com/vacp2p/linea-besu.git
synced 2026-01-09 21:17:54 -05:00
Duplicate publishing conf for platform project
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
This commit is contained in:
66
build.gradle
66
build.gradle
@@ -514,14 +514,7 @@ subprojects {
|
||||
return result
|
||||
}
|
||||
|
||||
def hasPlugin = { pluginName ->
|
||||
def result = project.getPluginManager().hasPlugin(pluginName)
|
||||
def projectName = project.name
|
||||
logger.info("Project = " + projectName + (result ? " has" : "has not") + " plugin " + pluginName)
|
||||
return result
|
||||
}
|
||||
|
||||
if (hasPlugin("java-platform") || sourceSetIsPopulated("main") || sourceSetIsPopulated("testSupport")) {
|
||||
if (sourceSetIsPopulated("main") || sourceSetIsPopulated("testSupport")) {
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
publishing {
|
||||
@@ -537,40 +530,37 @@ subprojects {
|
||||
}
|
||||
|
||||
publications {
|
||||
if(!hasPlugin("java-platform")) {
|
||||
mavenJava(MavenPublication) {
|
||||
groupId "io.consensys.linea-besu.internal"
|
||||
version "${project.version}"
|
||||
|
||||
mavenJava(MavenPublication) {
|
||||
groupId "io.consensys.linea-besu.internal"
|
||||
version "${project.version}"
|
||||
if (sourceSetIsPopulated("main")) {
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
}
|
||||
|
||||
if (sourceSetIsPopulated("main")) {
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
if (sourceSetIsPopulated("testSupport")) {
|
||||
artifact testSupportJar
|
||||
}
|
||||
|
||||
versionMapping {
|
||||
usage('java-api') { fromResolutionOf('runtimeClasspath') }
|
||||
usage('java-runtime') { fromResolutionResult() }
|
||||
}
|
||||
pom {
|
||||
name = "Linea Besu - ${project.name}"
|
||||
url = 'https://github.com/ConsenSys/linea-besu'
|
||||
licenses {
|
||||
license {
|
||||
name = 'The Apache License, Version 2.0'
|
||||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||
}
|
||||
}
|
||||
|
||||
if (sourceSetIsPopulated("testSupport")) {
|
||||
artifact testSupportJar
|
||||
}
|
||||
|
||||
versionMapping {
|
||||
usage('java-api') { fromResolutionOf('runtimeClasspath') }
|
||||
usage('java-runtime') { fromResolutionResult() }
|
||||
}
|
||||
pom {
|
||||
name = "Linea Besu - ${project.name}"
|
||||
scm {
|
||||
connection = 'scm:git:git://github.com/ConsenSys/linea-besu.git'
|
||||
developerConnection = 'scm:git:ssh://github.com/ConsenSys/linea-besu.git'
|
||||
url = 'https://github.com/ConsenSys/linea-besu'
|
||||
licenses {
|
||||
license {
|
||||
name = 'The Apache License, Version 2.0'
|
||||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection = 'scm:git:git://github.com/ConsenSys/linea-besu.git'
|
||||
developerConnection = 'scm:git:ssh://github.com/ConsenSys/linea-besu.git'
|
||||
url = 'https://github.com/ConsenSys/linea-besu'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,7 +185,20 @@ spotless {
|
||||
}
|
||||
}
|
||||
|
||||
def cloudsmithUser = project.hasProperty('cloudsmithUser') ? project.property('cloudsmithUser') : System.getenv('CLOUDSMITH_USER')
|
||||
def cloudsmithKey = project.hasProperty('cloudsmithApiKey') ? project.property('cloudsmithApiKey') : System.getenv('CLOUDSMITH_API_KEY')
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = "cloudsmith"
|
||||
url = "https://api.cloudsmith.io/maven/consensys/linea-besu/"
|
||||
credentials {
|
||||
username = cloudsmithUser
|
||||
password = cloudsmithKey
|
||||
}
|
||||
}
|
||||
}
|
||||
publications {
|
||||
mavenPlatform(MavenPublication) {
|
||||
from components.javaPlatform
|
||||
|
||||
Reference in New Issue
Block a user