Skip to content

Commit

Permalink
feat:maven publish
Browse files Browse the repository at this point in the history
Signed-off-by: grapebaba <[email protected]>
  • Loading branch information
GrapeBaBa committed Sep 1, 2023
1 parent 4de8488 commit acb8d8f
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,62 @@ spotless {
}
}

publishing {
publications {
mavenJava(MavenPublication) {

from components.java

pom {
name = rootProject.name
description = 'Client library for Flashbots MEV-share Matchmaker.'
url = 'https://github.com/optimism-java/mev-share-java'

licenses {
license {
name = 'MIT License'
}
}
developers {
developer {
id = 'grapebaba'
name = 'Kai Chen'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/optimism-java/' + rootProject.name + '.git'
developerConnection = 'scm:git:ssh://github.com/optimism-java/' + rootProject.name + '.git'
url = 'https://github.com/optimism-java/' + rootProject.name
}
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/optimism-java/" + rootProject.name
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}

signing {
sign publishing.publications.mavenJava
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
}

nexusPublishing {
repositories {
sonatype()
}
}

tasks.register('printSourceDirs') {
print("$projectDir\n")
print(sourceSets)
Expand Down

0 comments on commit acb8d8f

Please sign in to comment.