Skip to content

Commit

Permalink
Improve maven publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
andresmanz committed Nov 26, 2014
1 parent 65c0c4f commit 37643a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ mainClassName = 'org.cethos.tools.ninepatchconvert.NinePatchConvert'

apply from : 'publish.gradle'

allprojects {
version = '1.0.0'
group = 'org.cethos.tools'
}

repositories {
mavenCentral()
}
Expand Down
16 changes: 6 additions & 10 deletions publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ artifacts {
archives javadocJar, sourcesJar
}

group = "org.cethos.tools"
archivesBaseName = "ninepatch-convert"
version = "1.0.0"
def isReleaseBuild = hasProperty("release")

def isDevBuild = true

if(!isDevBuild) {
if(isReleaseBuild) {
signing {
sign configurations.archives
}
Expand All @@ -32,9 +28,7 @@ if(!isDevBuild) {

uploadArchives {
repositories {
if (isDevBuild) {
mavenLocal()
} else {
if (isReleaseBuild) {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

Expand All @@ -49,7 +43,7 @@ uploadArchives {
pom.project {
name 'NinePatch Convert'
packaging 'jar'
// optionally artifactId can be defined here
artifactId 'ninepatch-convert'
description 'A small tool that batch converts regular images to nine-patches.'
url 'https://github.com/andresmanz/ninepatch-convert'

Expand All @@ -75,6 +69,8 @@ uploadArchives {
}
}
}
} else {
mavenLocal()
}
}
}

0 comments on commit 37643a8

Please sign in to comment.