Created
March 2, 2012 15:12
-
-
Save nosrednakram/1959074 to your computer and use it in GitHub Desktop.
Basic build.gradle for Groovy jar libraries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'groovy' | |
description = "Library Name" | |
group = 'package.name' | |
version = "0.0.1" | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
groovy group: 'org.codehaus.groovy', name: 'groovy', version: '1.8.4' | |
testCompile group: 'junit', name: 'junit', version: '3.8.1' | |
testCompile group: 'log4j', name: 'log4j', version: '1.2.15' | |
} | |
task copyToLib(type: Copy) { | |
into "$buildDir/output/lib" | |
from configurations.runtime | |
} | |
task "create-dirs" << { | |
sourceSets.all*.groovy.srcDirs*.each { it.mkdirs() } | |
sourceSets.all*.resources.srcDirs*.each { it.mkdirs() } | |
} | |
// Add groovydoc settings | |
groovydoc { | |
docTitle = "Groovy User File Util $version" | |
title = docTitle | |
header = docTitle | |
windowTitle = docTitle | |
use = true | |
// Links to external Javadoc | |
link('http://download.oracle.com/javase/6/docs/api/', | |
'java.', 'org.xml', 'javax.', 'org.xml.') | |
link('http://static.springsource.org/spring/docs/3.0.x/javadoc-api/', | |
'org.springframework.context') | |
link('http://groovy.codehaus.org/api/', 'groovy.', 'org.codehaus.groovy.') | |
link('http://logging.apache.org/log4j/1.2/xref/', 'org.apache.log4j') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment