forked from jpos/jPOS-EE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publishing.gradle
37 lines (32 loc) · 1.17 KB
/
publishing.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
apply plugin: 'maven-publish'
apply plugin: 'signing'
def isSnapshot = version.contains("SNAPSHOT")
def mavenCentralRepo = isSnapshot ?
'https://oss.sonatype.org/content/repositories/snapshots/' :
'https://oss.sonatype.org/service/local/staging/deploy/maven2';
project.archivesBaseName="jposee-${project.name}"
publishing {
repositories {
maven {
def releasesRepoUrl = mavenCentralRepo
def snapshotsRepoUrl = 'file:///opt/local/maven'
url = isSnapshot ? snapshotsRepoUrl : releasesRepoUrl
if (!isSnapshot) {
credentials {
if (project.hasProperty("mavenCentralUsername"))
username = mavenCentralUsername
if (project.hasProperty("mavenCentralPassword"))
password = mavenCentralPassword
}
}
}
}
} // publishing
repositories {
mavenCentral()
maven { url 'https://jpos.org/maven' }
maven { url 'https://download.oracle.com/maven' }
maven { url 'https://maven.vaadin.com/vaadin-addons' }
maven { url 'https://maven.vaadin.com/vaadin-prereleases' }
mavenLocal()
}