Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
191 lines (160 sloc) 5.02 KB
/*
* Copyright (c) 2013 Nigel Duffy
*
* 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.
*/
task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}
apply plugin: 'eclipse'
apply plugin: 'java'
test {
include "**/UnitSuite.class"
maxHeapSize = "3500m"
}
version = '0.0.6'
group = 'org.nickelproject'
jar {
manifest {
attributes 'Implementation-Title': 'nickel', 'Implementation-Version': version
}
excludes << '**/AwsCredentials.properties'
}
//compileJava.options.compilerArgs << '-Xlint'
compileJava.options.compilerArgs << '-Werror'
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
excludes << '**/AwsCredentials.properties'
excludes << '**/log4j.properties'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
repositories {
mavenCentral()
}
dependencies {
compile "net.sf.supercsv:super-csv:2.1.0"
compile "com.google.guava:guava:15.0"
compile "com.amazonaws:aws-java-sdk:1.9.0"
compile "commons-codec:commons-codec:1.8"
compile "commons-io:commons-io:2.4"
compile "org.apache.commons:commons-lang3:3.3.2"
compile "com.google.code.findbugs:annotations:2.0.0"
compile "com.google.inject:guice:3.0"
compile "javassist:javassist:3.12.1.GA"
compile "org.slf4j:slf4j-api:1.7.7"
testCompile "org.slf4j:slf4j-log4j12:1.7.7"
compile "junit:junit:4.11"
testCompile 'org.easymock:easymock:3.2'
}
apply plugin: 'findbugs'
findbugs {
toolVersion = "2.0.3"
}
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
apply plugin: 'checkstyle'
checkstyle {
ignoreFailures = false
}
checkstyleMain {
classpath += configurations.compile
}
checkstyleTest {
classpath += configurations.compile
}
task checkstyleReport (dependsOn: [checkstyleMain, checkstyleTest]) << {
ant.xslt(in: "$buildDir/reports/checkstyle/main.xml",
style:"config/checkstyle/checkstyle.xsl",
out:"$buildDir/reports/checkstyle/checkstyleMain.html"
) {
// to pass parameters to the xsl
// param(name:"project.name",expression:"$parent.name/$project.name")
}
ant.xslt(in: "$buildDir/reports/checkstyle/test.xml",
style:"config/checkstyle/checkstyle.xsl",
out:"$buildDir/reports/checkstyle/checkstyleTest.html"
) {
// to pass parameters to the xsl
// param(name:"project.name",expression:"$parent.name/$project.name")
}
}
apply plugin: 'pmd'
apply plugin: 'jdepend'
apply plugin: 'jacoco'
jacoco {
toolVersion = "0.6.4.201312101107"
reportsDir = file("$buildDir/reports/jacoco")
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination "${buildDir}/reports/jacocoHtml"
}
}
apply plugin: 'maven'
apply plugin: 'signing'
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom.project {
name 'Nickel'
packaging 'jar'
description 'A distributed analytics database'
url 'http://nickelproject.org/'
inceptionYear '2013'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
scm {
connection 'scm:git:git@github.com:nyjle/nickelproject.git'
developerConnection 'scm:git:git@github.com:nyjle/nickelproject.git'
url 'git@github.com:nyjle/nickelproject.git'
}
developers {
developer {
id 'nyjle'
name 'Nigel Duffy'
}
}
}
}
}
}