Skip to content

Spotless Eclipse Framework Final #261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jul 18, 2018
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Allow configuration of snapshot repository for upload.
  • Loading branch information
fvgh committed May 5, 2018
commit 8cbbaab71285f44321d51c3006dfd0b266d82ea4
26 changes: 13 additions & 13 deletions _ext/gradle/java-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ task javadocJar(type: Jar, dependsOn: javadoc) {

def isSnapshot = ext_version.endsWith('-SNAPSHOT')
// pulls the credentials from either the environment variable or gradle.properties
def cred = {
if (System.env[it] != null) {
return System.env[it]
} else if (project.hasProperty(it)) {
return project[it]
def lookup = { key, defaultVal ->
if (System.env[key] != null) {
return System.env[key]
} else if (project.hasProperty(key)) {
return project[key]
} else {
return 'unknown_' + it
return defaultVal
}
}

Expand Down Expand Up @@ -69,10 +69,10 @@ model {
// upload snapshots to oss.sonatype.org
repositories {
maven {
url = 'https://oss.sonatype.org/content/repositories/snapshots'
url = lookup('snapshot_url', 'https://oss.sonatype.org/content/repositories/snapshots')
credentials {
username = cred('nexus_user')
password = cred('nexus_pass')
username = lookup('nexus_user', 'unknown_nexus_user')
password = lookup('nexus_pass', 'unknown_nexus_pass')
}
} }
}
Expand All @@ -82,8 +82,8 @@ model {
if (!isSnapshot) {
// upload releases to bintray and then mavenCentral
bintray {
user = cred('bintray_user')
key = cred('bintray_pass')
user = lookup('bintray_user', 'unknown_bintray_user')
key = lookup('bintray_pass', 'unknown_bintray_pass')
publications = [
'mavenJava'
]
Expand All @@ -95,8 +95,8 @@ if (!isSnapshot) {
version {
name = project.ext_version
mavenCentralSync {
user = cred('nexus_user')
password = cred('nexus_pass')
user = lookup('nexus_user', 'unknown_nexus_user')
password = lookup('nexus_pass', 'unknown_nexus_user')
}
}
}
Expand Down