Newer
Older
publishing {
publications {
library(MavenPublication) {
groupId = "ghsc"
version = project.getProperty("version")
version = version == "unspecified" ? "latest" : version
from components.java
}
}
repositories {
maven {
url "https://code.usgs.gov/api/v4/projects/3339/packages/maven"
name = "GitLab"
credentials(HttpHeaderCredentials) {
name = 'Job-Token'
value = System.getenv("CI_JOB_TOKEN")
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
repositories {
jcenter()
maven {
url "https://artifacts.unidata.ucar.edu/repository/unidata-all/"
}
maven {
url "https://code.usgs.gov/api/v4/groups/160/-/packages/maven"
if (System.getenv('CI_JOB_TOKEN')) {
credentials(HttpHeaderCredentials) {
name = 'Job-Token'
value = System.getenv("CI_JOB_TOKEN")
}
} else {
credentials(HttpHeaderCredentials) {
name = 'Private-Token'
value = System.getenv("GITLAB_TOKEN")
}
}
authentication {
header(HttpHeaderAuthentication)
}
}
}