Skip to content

Commit

Permalink
build: bintrayPublish will not run on it's own
Browse files Browse the repository at this point in the history
  • Loading branch information
antonydenyer committed Sep 20, 2019
1 parent 9e81d25 commit 0f8a995
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 48 deletions.
5 changes: 2 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ release-snapshot:
OSSRH_REPO_URL: $SNAPSHOT_OSSRH_REPO_URL
stage: release
script:
- ./gradlew release -x build
- ./gradlew uploadArchives -x build
only:
refs:
- master
Expand All @@ -57,7 +57,7 @@ release-version:
stage: release
script:
- sed -i "47s/.*/ web3jVersion = '${CI_COMMIT_REF_NAME//release\/}'/" build.gradle
- ./gradlew -Pversion=${CI_COMMIT_REF_NAME//release\/} bintrayUpload -x bintrayPublish
- ./gradlew -Pversion=${CI_COMMIT_REF_NAME//release\/} bintrayUpload bintrayPublish
only:
refs:
- /^release\/(\d*).(\d*).(\d*)/
Expand All @@ -68,7 +68,6 @@ publish-version:
OSSRH_REPO_URL: $RELEASE_OSSRH_REPO_URL
stage: publish
script:
- ./gradlew -Pversion=${CI_COMMIT_REF_NAME//release\/} bintrayPublish
- ./gradlew -Pversion=${CI_COMMIT_REF_NAME//release\/} githubRelease
only:
refs:
Expand Down
45 changes: 0 additions & 45 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -225,51 +225,6 @@ bintray {
}
}

task release {
dependsOn 'build'
dependsOn 'uploadArchives'

doLast {
// Validates the user inputs before a release can be performed.
if (isSnapshotVersion) {
// Only need OSSRH details.
logger.lifecycle("About to perform {} snapshot release ...", manualRelease ? "a manual" : "an automated")

if (!ossrhUsername || !ossrhPassword || !ossrhRepoUrl) {
throw new InvalidUserDataException("Required parameters missing: 'ossrhUsername', 'ossrhPassword', 'ossrhRepoUrl'")
}

logger.lifecycle(" - ossrhUsername={}", ossrhUsername)
logger.lifecycle(" - ossrhPassword={}", ossrhPassword ? "provided" : "not_provided")
logger.lifecycle(" - ossrhRepoUrl={}", ossrhRepoUrl)
} else {
// Release => Need OSSRH and bintray.
if (!ossrhUsername || !ossrhPassword || !ossrhRepoUrl) {
throw new InvalidUserDataException("Required parameters missing: 'ossrhUsername', 'ossrhPassword', 'ossrhRepoUrl'")
}
if (!bintrayUser || !bintrayKey || !bintrayGpgPassphrase) {
throw new InvalidUserDataException("Required parameters missing: 'bintrayUser', 'bintrayKey', 'bintrayGpgPassphrase'")
}
logger.lifecycle("About to perform {} full release ...", manualRelease ? "a manual" : "an automated")
logger.lifecycle(" - ossrhUsername={}", ossrhUsername)
logger.lifecycle(" - ossrhPassword={}", ossrhPassword ? "provided" : "not_provided")
logger.lifecycle(" - ossrhRepoUrl={}", ossrhRepoUrl)
logger.lifecycle(" - bintrayUser={}", bintrayUser)
logger.lifecycle(" - bintrayKey={}", bintrayKey ? "provided" : "not_provided")
logger.lifecycle(" - bintrayGpgPassphrase={}", bintrayGpgPassphrase ? "provided" : "not_provided")
}
}

// Snapshots go to nexus, non-snapshots go to bintray.
if (isSnapshotVersion) {
dependsOn 'uploadArchives'
tasks.findByName('uploadArchives').mustRunAfter 'build'
} else {
dependsOn 'bintrayUpload'
tasks.findByName('bintrayUpload').mustRunAfter 'build'
}
}

compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
Expand Down

0 comments on commit 0f8a995

Please sign in to comment.