Skip to content

Instantly share code, notes, and snippets.

@bladeFury
Created November 30, 2014 14:19
Show Gist options
  • Save bladeFury/34ad14241e08cc4d9d64 to your computer and use it in GitHub Desktop.
Save bladeFury/34ad14241e08cc4d9d64 to your computer and use it in GitHub Desktop.
no source push gradle
/*
* Copyright 2013 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'maven'
def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
}
def getReleaseRepositoryUrl() {
return "http://115.29.39.214:8081/nexus/content/repositories/releases"
}
def getSnapshotRepositoryUrl() {
return "http://115.29.39.214:8081/nexus/content/repositories/snapshots"
}
def getRepositoryUsername() {
return producerName;
}
def getRepositoryPassword() {
return producerPass;
}
afterEvaluate { project ->
uploadArchives {
repositories {
mavenDeployer {
pom.groupId = "com.wukongtv.lib"
pom.artifactId = libName
pom.version = versionName
repository(url: getReleaseRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
snapshotRepository(url: getSnapshotRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
// pom.project {
// name POM_NAME
// packaging POM_PACKAGING
// description POM_DESCRIPTION
// url POM_URL
// }
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment