-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure deployment to maven central
- Loading branch information
1 parent
c3d2ff4
commit bd1cefc
Showing
5 changed files
with
106 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
plugins { | ||
id "java-library" | ||
id "signing" | ||
id "maven-publish" | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
javadoc { | ||
options.addBooleanOption('html5', true) | ||
} | ||
|
||
def getOptionalProperty(String name) { | ||
if(project.hasProperty(name)) { | ||
return project.property(name) | ||
} | ||
logger.info("Project property '${name}' not available. Please it to ~/.gradle/gradle.properties") | ||
return null | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
artifactId = 'whiterabbit-plugin-api' | ||
from components.java | ||
pom { | ||
name = 'WhiteRabbit Plugin API' | ||
description = 'API implemented by plugins for the WhiteRabbit time recording application' | ||
url = 'https://github.com/itsallcode/white-rabbit' | ||
|
||
licenses { | ||
license { | ||
name = 'GNU General Public License, Version 3.0' | ||
url = 'https://www.gnu.org/licenses/gpl-3.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'kaklakariada' | ||
name = 'Christoph' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:https://github.com/itsallcode/white-rabbit.git' | ||
developerConnection = 'scm:git:https://github.com/itsallcode/white-rabbit.git' | ||
url = 'https://github.com/itsallcode/white-rabbit' | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/" | ||
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl | ||
allowInsecureProtocol = false | ||
credentials(PasswordCredentials) { | ||
username = getOptionalProperty("ossrhUsername") | ||
password = getOptionalProperty("ossrhPassword") | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
sign publishing.publications.mavenJava | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,6 @@ include 'plugins:pmsmart' | |
|
||
dependencyResolutionManagement { | ||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
} | ||
} |