Skip to content

Commit

Permalink
Gradle Deployment #80
Browse files Browse the repository at this point in the history
  • Loading branch information
jerronjames committed Oct 6, 2015
1 parent 22a55c1 commit 300427f
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/.project
/.settings/
.gradle/**/*
/build
36 changes: 26 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
buildscript {
repositories {
mavenLocal()
jcenter {
url "http://jcenter.bintray.com/"
}
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
classpath 'com.bmuschko:gradle-nexus-plugin:2.3'
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
}
}

plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '1.2.2'
}

apply plugin: "base"
apply plugin: "signing"
apply plugin: "com.bmuschko.nexus"

apply plugin: 'java'
apply plugin: 'maven'
apply from: 'cobertura.gradle'

group = 'com.github.cflint'
version = '0.5.0'

description = """CFLint"""
apply from: 'deploy.gradle'

sourceCompatibility = 1.7
targetCompatibility = 1.7



repositories {

maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "http://repo.maven.apache.org/maven2" }
}
dependencies {
compile group: 'com.github.cfparser', name: 'cfparser', version:'2.0.0'
Expand Down
27 changes: 27 additions & 0 deletions deploy.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
configurations {
jaxDoclet
}

nexus {
sign = true
repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
}

task deploy() {
def updatedVersion = version
if (project.hasProperty("version")) {
ant.propertyfile(
file: "gradle.properties") {
entry( key: "version", value: "$version")
}
}
if (project.hasProperty("snapshot")) {
ant.propertyfile(
file: "gradle.properties") {
entry( key: "version", value: "$version-SNAPSHOT")
}
}
}

uploadArchives.mustRunAfter deploy
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#Tue, 06 Oct 2015 15:51:31 -0600
group=com.github.cflint
version=0.5.0
name=CFLint

0 comments on commit 300427f

Please sign in to comment.