Skip to content

Commit

Permalink
Prepare for maven central release [v(0.1.0)]
Browse files Browse the repository at this point in the history
  • Loading branch information
Vignesh committed Dec 23, 2015
1 parent c484d93 commit 49575bb
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 83 deletions.
25 changes: 3 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@ buildscript {
}
}

allprojects {
repositories {
mavenLocal()
repositories {
maven {
url "https://raw.githubusercontent.com/iincube/mdeals/master/releases"
credentials {
username GIT_USERNAME
password GIT_PASSWORD
}
authentication {
basic(BasicAuthentication)
}
}
}
}
}

ext {
versionCode = 1
versionName = "1.0"
Expand All @@ -35,11 +17,10 @@ ext.libraries = [
javaxServlet: 'javax.servlet:javax.servlet-api:3.0.1',
gson: 'com.google.code.gson:gson:2.4',
mongoDriver: 'org.mongodb:mongo-java-driver:2.7.3',
mongoapi: 'in.mtap.iincube:mongoapi:0.0.2',
mongoapi: 'in.mtap.iincube:mongoapi:0.0.9',
mongoser: project(':mongoser'),
googleTruth: 'com.google.truth:truth:0.27',
junit: 'junit:junit:4.11',
mockito: 'org.mockito:mockito-core:1.10.+',
apacheCommons: 'commons-codec:commons-codec:1.9',
gitpushplugin: 'com.ryanharter.gradle-git-repo:gradle-plugin:1.0.2'
mockito: 'org.mockito:mockito-core:1.10.19',
apacheCommons: 'commons-codec:commons-codec:1.9'
]
7 changes: 2 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=in.mtap.iincube
VERSION_NAME=0.0.6
VERSION_NAME=0.1.0

POM_DESCRIPTION=MongoDB REST API
POM_URL=https://github.com/safetrax/mongorest
Expand All @@ -10,7 +10,4 @@ POM_LICENCE_NAME=Apache software license, Version 2.0
POM_LICENCE_URL=http://mtap.in
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=vignesh-iopex
POM_DEVELOPER_NAME=Vignesh Periasami

RELEASE_REPOSITORY_URL[email protected]:iincube/mdeals.git/releases
SNAPSHOT_REPOSITORY_URL[email protected]:iincube/mdeals.git/snapshots
POM_DEVELOPER_NAME=Vignesh Periasami
105 changes: 53 additions & 52 deletions gradle/mvnpush.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,70 +23,71 @@ def getRepositoryPassword() {
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
}

afterEvaluate { project ->
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

pom.groupId = GROUP
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME

repository(url: getReleaseRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
snapshotRepository(url: getSnapshotRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

pom.groupId = GROUP
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME

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
pom.project {
name POM_NAME
packaging POM_PACKAGING
description POM_DESCRIPTION
url POM_URL

scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
}
scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
}

licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
}
}
}

developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
}
}
}
}
}
}
}

signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from tasks.javadoc.destinationDir
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives sourcesJar
archives javadocJar
artifacts {
archives sourcesJar
archives javadocJar
}
}
2 changes: 0 additions & 2 deletions mongoapi/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apply plugin: 'git-repo'
apply plugin: 'java'

sourceCompatibility = 1.7
version = '1.0'

repositories {
mavenCentral()
Expand Down
2 changes: 0 additions & 2 deletions mongoser/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apply plugin: 'java'
apply plugin: 'git-repo'

sourceCompatibility = 1.7
version = '1.0'

repositories {
mavenCentral()
Expand Down

0 comments on commit 49575bb

Please sign in to comment.