Created
April 14, 2014 18:23
-
-
Save ahonor/10671410 to your computer and use it in GitHub Desktop.
openstack build.gradle
This file contains hidden or 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
version = '1.0.0' | |
defaultTasks 'clean','build' | |
apply plugin: 'java' | |
apply plugin: 'idea' | |
sourceCompatibility = 1.5 | |
ext.rundeckPluginVersion= '1.1' | |
configurations{ | |
//declare custom pluginLibs configuration to include only libs for this plugin | |
pluginLibs | |
//declare compile to extend from pluginLibs so it inherits the dependencies | |
compile{ | |
extendsFrom pluginLibs | |
} | |
} | |
repositories { | |
mavenLocal() | |
mavenCentral() | |
} | |
dependencies { | |
pluginLibs group: 'org.apache.jclouds', name: 'jclouds-all', version: '1.7.1' | |
compile( [group: 'org.rundeck', name: 'rundeck-core', version: '2.0.3', ext:'jar']) | |
testCompile( | |
//[group: 'junit', name: 'junit', version: '3.8.1',ext:'jar'] | |
) | |
} | |
// task to copy plugin libs to output/lib dir | |
task copyToLib(type: Copy) { | |
into "$buildDir/output/lib" | |
from configurations.pluginLibs | |
} | |
ext.pluginClassNames='org.rundeck.plugin.openstack.CreateInstanceStep' | |
jar { | |
//include contents of output dir | |
from "$buildDir/output" | |
manifest { | |
attributes 'Rundeck-Plugin-Classnames': pluginClassNames | |
attributes 'Rundeck-Plugin-File-Version': version | |
attributes 'Rundeck-Plugin-Version': rundeckPluginVersion, 'Rundeck-Plugin-Archive': 'true' | |
} | |
} | |
//set jar task to depend on copyToLib | |
jar.dependsOn(copyToLib) | |
task wrapper(type: Wrapper) { | |
gradleVersion = '1.8' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment