Set up publishing to 4benj-maven for dev builds

This commit is contained in:
Benj
2022-06-22 09:24:43 +08:00
parent 25bdfbe3bc
commit 519367a1a4

View File

@@ -171,7 +171,16 @@ publishing {
} }
repositories { repositories {
maven { maven {
// change URLs to point to your repos, e.g. http://my.org/repo if(version.endsWith('-dev')) {
println ("Publishing to 4benj-maven")
url 'https://repo.4benj.com/releases'
name '4benj-maven'
credentials {
username System.getenv('benj_maven_username')
password System.getenv('benj_maven_token')
}
} else {
println ("Publishing to sonatype")
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/' def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/' def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
@@ -181,6 +190,7 @@ publishing {
} }
} }
} }
}
clean { clean {
delete protobuf.generatedFilesBaseDir delete protobuf.generatedFilesBaseDir
@@ -225,8 +235,10 @@ eclipse {
} }
signing { signing {
if(!version.endsWith('-dev')) {
sign publishing.publications.mavenJava sign publishing.publications.mavenJava
} }
}
javadoc { javadoc {
options.encoding = 'UTF-8' options.encoding = 'UTF-8'