jem/build.gradle

88 lines
2.3 KiB
Groovy
Raw Normal View History

apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'codenarc'
version = '0.1'
group = 'com.github.jrubygradle'
description = 'A Groovy-based library for managing Ruby gems'
repositories {
jcenter()
mavenLocal()
}
dependencies {
compile "org.codehaus.groovy:groovy-all:2.4.0+"
compile 'org.slf4j:slf4j-api:1.7.12+'
/* using the simple logger at runtime, no need for it at compile time though */
runtime 'org.slf4j:slf4j-simple:1.7.12+'
compile 'joda-time:joda-time:2.6+'
/* Used for processing yaml files inside of gems */
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.5.4'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.5.4'
compile 'com.fasterxml.jackson.core:jackson-databind:2.5.4'
/* Used for reading into tar, aka gem, files */
compile 'org.apache.commons:commons-vfs2:2.1-SNAPSHOT'
/* Needed to provide the tar file provider */
compile 'org.apache.commons:commons-compress:1.9+'
//compile 'org.apache.commons:commons-vfs2:2.0'
compile 'org.apache.commons:commons-io:1.3.2+'
codenarc "org.codenarc:CodeNarc:0.24"
testCompile "org.spockframework:spock-core:1.0-groovy-2.4"
}
codenarc {
sourceSets = [sourceSets.main]
configFile = file("${projectDir}/gradle/codenarc.rules")
}
test {
testLogging {
showStandardStreams = true
exceptionFormat "full"
}
}
plugins.withType(JavaPlugin) {
sourceCompatibility = 1.7
targetCompatibility = 1.7
project.tasks.withType(JavaCompile) { task ->
task.sourceCompatibility = project.sourceCompatibility
task.targetCompatibility = project.targetCompatibility
}
project.tasks.withType(GroovyCompile) { task ->
task.sourceCompatibility = project.sourceCompatibility
task.targetCompatibility = project.targetCompatibility
}
}
/* Add the sources jar to the list of artifacts to publish */
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task groovydocJar(type: Jar) {
dependsOn groovydoc
classifier = 'groovydoc'
from groovydoc.destinationDir
}
artifacts {
archives sourcesJar
archives groovydocJar
}
assemble.dependsOn check
assemble.dependsOn groovydocJar
assemble.dependsOn sourcesJar