Skip to content

Commit

Permalink
Update build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
danfowler committed Jul 20, 2023
1 parent edb2774 commit ad0e688
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,63 @@ artifacts {
archives javadocJar, sourcesJar
}

def ossrhUsername = System.getenv("SONATYPE_USERNAME")
def ossrhPassword = System.getenv("SONATYPE_PASSWORD")

publishing {
publications {
mavenJava(MavenPublication) {
artifactId 'omise-java'
pom {
name = 'Omise Java'
description = 'Java bindings for the Omise API'
url = 'https://www.omise.co'
licenses {
license {
name = 'The MIT License (MIT)'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'chakrit'
name = 'Omise'
email = 'support@opn.ooo'
}
}
scm {
connection = 'scm:git:git://git.github.com/omise/omise-java'
developerConnection = 'scm:git:git://git.github.com/omise/omise-java'
url = 'https://github.com/omise/omise-java'
}
}
}
}

repositories {
maven {
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = ossrhUsername
password = ossrhPassword
}
}

maven {
name = 'snapshotRepository'
url = 'https://oss.sonatype.org/content/repositories/snapshots'
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}

signing {
sign publishing.publications.mavenJava
}

/**
* {@link Package#getImplementationVersion()} on IDE will alway return `null`
* because this method read data from `META-INF/MANIFEST.MF` that contain in `.jar`.
Expand Down

0 comments on commit ad0e688

Please sign in to comment.