Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
91 lines (79 sloc) 2.74 KB
group 'io.cloudgrey.appiumpro'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'kotlin'
sourceCompatibility = 1.8
kotlin_version = '1.3.41'
repositories {
maven { url "https://jitpack.io" }
mavenCentral()
}
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation group: 'io.appium', name: 'java-client', version: '7.3.0'
testImplementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '3.13.0'
testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
testImplementation group: 'com.eclipsesource.minimal-json', name: 'minimal-json', version: '0.9.5'
testImplementation group: 'org.java-websocket', name: 'Java-WebSocket', version: '1.3.9'
testImplementation group: 'org.zeroturnaround', name: 'zt-exec', version: '1.10'
testImplementation group: 'me.xdrop', name: 'fuzzywuzzy', version: '1.2.0'
testImplementation group: 'io.appium', name: 'mitmproxy-java', version: '1.6.1'
testImplementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: "$kotlin_version"
}
test {
maxParallelForks = 3
forkEvery = 1
}
buildscript {
ext.kotlin_version = '1.3.41'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
// for getting jar for aws
// source: https://stackoverflow.com/a/52398377
task marshallClasspathDeps(type: Copy) {
from sourceSets.test.runtimeClasspath
// if you need this from the dependencies in the build.gradle then it should be :
// from sourceSets.main.runtimeClasspath
include '**/*.class'
include '**/*.jar'
exclude { FileTreeElement details ->
details.file.name.contains('Edition') || details.file.name.contains('kotlin')
}
into 'build/libs/dependency-jars'
}
//packaging tests task which is generated from sample using gradle init
task packageTests(type: Jar) {
from (sourceSets.test.output) {
include '**/*DeviceFarm*'
}
classifier = 'tests'
includeEmptyDirs = false
}
// create zip archive
// source: https://stackoverflow.com/a/36883221/8016330
task zip(type: Zip) {
dependsOn packageTests, marshallClasspathDeps
from 'build/libs/'
include '*'
include '*/*' //to include contents of a folder present inside dependency-jars directory
archiveName 'zip-with-dependencies.zip'
}
task writeClasspath << {
buildDir.mkdirs()
new File(buildDir, "classpath.txt").text = sourceSets.test.runtimeClasspath.asPath + ":" + sourceSets.main.runtimeClasspath.asPath + "\n"
}
You can’t perform that action at this time.