Created
September 11, 2013 18:54
-
-
Save Scuilion/6528120 to your computer and use it in GitHub Desktop.
build.grade for plugin
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' | |
apply plugin: 'maven' | |
repositories { | |
mavenCentral() | |
} | |
sourceSets{ | |
integrationTest{ | |
compileClasspath += sourceSets.main.output + sourceSets.test.output + configurations.integrationTestCompile | |
runtimeClasspath += output + compileClasspath + configurations.integrationTestRuntime | |
} | |
} | |
configurations{ | |
integrationTestCompile.extendsFrom testCompile | |
integrationTestRuntime.extendsFrom testRuntime | |
integrationTestCompile.extendsFrom compile | |
integrationTestRuntime.extendsFrom runtime | |
} | |
dependencies { | |
compile localGroovy() | |
compile gradleApi() | |
compile('commons-lang:commons-lang:2.6') | |
integrationTestCompile sourceSets.test.output | |
} | |
task pluginJar(type: Jar){ | |
from sourceSets.main.output | |
} | |
artifacts { | |
archives pluginJar | |
} | |
uploadArchives { | |
dependsOn pluginJar | |
repositories { | |
mavenDeployer { | |
repository(url: "file:build/libs") | |
pom.version = '1.0' | |
pom.artifactId = 'myMavenName' | |
pom.groupId = 'buildings' | |
} | |
} | |
} | |
task intTest(type: Test){ | |
dependsOn uploadArchives | |
dependsOn integrationTestClasses | |
testClassesDir = sourceSets.integrationTest.output.classesDir | |
classpath = sourceSets.integrationTest.runtimeClasspath + sourceSets.main.output | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment