-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
39 lines (32 loc) · 1.1 KB
/
build.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
37
38
39
/*
This gradle build file is for uploading a domain model artifact to maven.
The artifact file location is supplied as a project property using `-PdomainModelArtifact`
Maven credentials can be supplied in two ways:
1. as project properties on the gradle command line with `-PmavenUser=XXXXX -PmavenPass=XXXXX`
2. as environment variables with `MAVEN_USER=XXXXX` and `MAVEN_PASS=XXXXX`
Usage: gradle publish -PmavenUser=${MAVEN_USER} -PmavenPass=${MAVEN_PASS} -PdomainModelArtifact=file.zip -PprojectVersion=1.2.3
*/
plugins {
id 'maven-publish'
}
project.group = projectGroup
project.version = projectVersion
println("Publishing " + project.version + " to " + mavenUrl)
def mavenUsername = System.getenv('MAVEN_USER') ?: mavenUser
def mavenPassword = System.getenv('MAVEN_PASS') ?: mavenPass
publishing {
publications {
maven(MavenPublication) {
artifact domainModelArtifact
}
}
repositories {
maven {
url = mavenUrl
credentials {
username = mavenUsername
password = mavenPassword
}
}
}
}