Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - publish to mavencentral rather than cloudsmith for libs/jars #9150

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ jobs:
- run:
name: Publish to Cloudsmith
command: |
./gradlew --no-daemon --parallel cloudsmithUpload publish
./gradlew --no-daemon --parallel cloudsmithUpload publish jreleaserRelease
- notify

publishDockerAmd64:
Expand Down Expand Up @@ -660,6 +660,7 @@ workflows:
- windowsBuild
context:
- protocols-cloudsmith
- protocols-maven-central
- publishDockerAmd64:
filters:
branches:
Expand Down
52 changes: 42 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ plugins {
id 'net.ltgt.errorprone' version '4.1.0' apply false
id 'de.undercouch.download' version '5.6.0'
id 'org.ajoberstar.grgit' version '5.3.0'
id 'org.jreleaser' version '1.16.0'
}

rootProject.version = calculatePublishVersion()
Expand Down Expand Up @@ -66,10 +67,7 @@ gradle.startParameter.taskNames.each {
gradle.startParameter.taskNames = expandedTaskList.flatten() as Iterable<String>

def userHome = System.getProperty("user.home")

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')

def group = "tech.pegasys.teku"

var baseInfrastructureProjects = [
':infrastructure:bytes',
Expand Down Expand Up @@ -843,12 +841,8 @@ subprojects {
publishing {
repositories {
maven {
name = "cloudsmith"
url = "https://api-g.cloudsmith.io/maven/consensys/teku/"
credentials {
username = cloudsmithUser
password = cloudsmithKey
}
name = "local"
url = rootProject.layout.buildDirectory.dir("jreleaser")
}
}
publications {
Expand Down Expand Up @@ -1150,3 +1144,41 @@ task cloudsmithUpload {
}
}

// see line 844
jreleaser {
project {
description.set("Teku is a full Ethereum 2.0 client built to meet institutional needs and security requirements.")
license.set("(Apache-2.0)")
inceptionYear.set("2024")
copyright.set("Consensys Software Inc., 2022")
links {
homepage.set("https://github.com/usmansaleem/besu-pkcs11-plugin")
documentation.set("https://github.com/usmansaleem/besu-pkcs11-plugin")
}
}
dependsOnAssemble.set(true)
gitRootSearch = true
release {
github {
commitAuthor {
name = 'Protocols Team'
email = '[email protected]'
}
}
}
signing {
active = 'ALWAYS'
armored = true
}
deploy {
maven {
mavenCentral {
sonatype {
active = 'ALWAYS'
url = 'https://central.sonatype.com/api/v1/publisher'
stagingRepository('build/jreleaser')
}
}
}
}
}