blob: 8c86e5a66ab5027f89ee023744a0b945abadfff7 [file] [log] [blame]
apply plugin: 'maven-publish'
ext.publishRepos = {
maven {
name 'eclipse'
def releaseRepoUrl = 'https://repo.eclipse.org/content/repositories/etrice-releases'
def snapshotRepoUrl = 'https://repo.eclipse.org/content/repositories/etrice-snapshots'
url = version.endsWith('SNAPSHOT') ? snapshotRepoUrl : releaseRepoUrl
credentials {
username project.properties.eclipseRepoUsername
password project.properties.eclipseRepoPassword
}
}
maven {
name 'protos'
url project.properties.protosPublicArtifactoryUrl
credentials {
username project.properties.protosPublicArtifactoryUsername
password project.properties.protosPublicArtifactoryPassword
}
}
}
afterEvaluate {
// default for java projects
if (project.plugins.hasPlugin('java')) {
publishing {
publications {
etrice(MavenPublication) {
from components.java
pom {
if (project.hasProperty('title')) {
name = project.title
description = project.description
}
url = 'https://www.eclipse.org/etrice'
licenses {
license {
name = 'Eclipse Public License, Version 2.0'
url = 'http://www.eclipse.org/legal/epl-v20.html'
}
}
scm {
url = "git://git.eclipse.org/gitroot/etrice/org.eclipse.etrice.git"
}
}
}
}
repositories publishRepos
}
}
}