Created
May 3, 2017 18:26
-
-
Save mach6/9618aa26f34a001478ff0602132d1552 to your computer and use it in GitHub Desktop.
Sample build.gradle with SeLion's Maven MOJO Code Generator
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
| apply plugin: 'java' | |
| apply plugin: 'maven' | |
| group = 'net.mach6' | |
| version = '1.0.0-SNAPSHOT' | |
| description = "MySeLionProject" | |
| sourceCompatibility = 1.7 | |
| targetCompatibility = 1.7 | |
| tasks.withType(JavaCompile) { | |
| options.encoding = 'UTF-8' | |
| } | |
| configurations.all { | |
| } | |
| repositories { | |
| maven { url "https://oss.sonatype.org/content/repositories/snapshots" } | |
| maven { url "http://repo.maven.apache.org/maven2" } | |
| } | |
| dependencies { | |
| testCompile group: 'com.paypal.selion', name: 'SeLion', version:'1.2.0' | |
| testCompile group: 'com.paypal.selion', name: 'SeLion-Grid', version:'1.2.0' | |
| testCompile group: 'org.seleniumhq.selenium', name: 'selenium-server', version: '2.53.1' | |
| } | |
| sourceSets { | |
| test { | |
| java { | |
| srcDirs = ['src/test/java', 'build/generated-test-sources'] | |
| } | |
| } | |
| } | |
| compileTestJava.doFirst { | |
| //generate java from PageYAML via mvn | |
| exec { | |
| commandLine 'mvn', 'generate-test-sources' | |
| } | |
| } | |
| clean.doLast { | |
| file('target').deleteDir() | |
| file('seLionFiles').deleteDir() | |
| file('test-output').deleteDir() | |
| } | |
| //packaging tests | |
| task packageTests(type: Jar) { | |
| from sourceSets.test.output | |
| classifier = 'tests' | |
| } | |
| test.useTestNG() { | |
| suites 'src/test/resources/WebTests.xml' | |
| } | |
| artifacts.archives packageTests |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment