There may be instances where you need to get started with TouchTest while offline. For example, you may be running TouchTest in an environment where you are not connected to the Internet or are restricted by a firewall.
If you are using the MakeAppTouchTestable utility, then you will can proceed as normal and use the following instructions.
If you are using the Gradle Plugin, then you must complete a few manual steps. The process for getting started with TouchTest offline (using Gradle) is outlined below.
- Prerequisites
- Using the Gradle Plugin Offline (below)
- Register Your Device
- Recording a TouchTest Scenario
Using the Gradle Plugin Offline
If you are using the Gradle Plugin, you must complete the following:
- For AspectJ Tools, download the most recent version (or the one you need).
When you download AspectJ Tools, ensure you configure the path to look like this:
/org/aspectj/aspectjtools/1.8.5/aspectjtools-1.8.5.jar
You must make a directory (folder) that has a folder that has a folder that has the jar file.
- For AspectJrt, use the following
When you download aspectjrt tools, ensure you configure the path to look like this:
aspectjrt /org/aspectj/aspectjrt/1.8.5/aspectjrt-1.8.5.jar
For aspectjrt, the jar file needs to be in a folder path name like this: 1.8.5 > aspectjrt > aspectj > org. The directory (folder) that holds these nested folders is the path you must put in your build script.
Build.Gradle Sample
Modify your build.gradle according to the comments provided in the sample below. (TouchTest is referred to as "TT" in the sample below.)
<p style="color: #5b5b5b; ; font-size: 12px; margin: 5px 0px 0px;">There may be instances where you need to get started with TouchTest while offline. For example, you may be running TouchTest in an environment where you are not connected to the Internet or are restricted by a firewall.</p>
buildscript {
System.properties['com.android.build.gradle.overrideVersionCheck'] = 'true'
repositories {
//Add the absolute path to your downloaded TT Plugin and TT Driver
maven { url "/Users//Downloads/gradle/touchtest-plugin" }
maven { url "/Users//Downloads/gradle/touchtestdriver" }
//Add the absolute path that contains your AspectJ tool and library
maven {url "/Users//Downloads"}
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath group: "com.soasta.touchtest", name: "touchtest-plugin", version: "1.0-SNAPSHOT", changing: true
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.soasta.touchtest'
configurations {
soasta
}
android {
compileSdkVersion 20
buildToolsVersion '20'
productFlavors {
free {
buildConfigField 'org.gradle.examples.android.MonetizationType', 'monetizationType', 'org.gradle.examples.android.MonetizationType.FREE'
versionCode 20
}
pro {
buildConfigField 'org.gradle.examples.android.MonetizationType', 'monetizationType', 'org.gradle.examples.android.MonetizationType.PRO'
minSdkVersion 16
targetSdkVersion 20
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt' } }
repositories {
//Add absolute path to your TT Driver that you have downloaded
maven { url "/Users//Downloads/gradle/touchtestdriver" }
}
dependencies {
compile 'commons-lang:commons-lang:2.6'
proCompile 'commons-codec:commons-codec:1.8'
//To add AspectJ dependencies, customers need to add these lines.
compile name: "aspectj-1.8.5"
compile name: "aspectjtools-1.8.5"
//To use the local TT Driver library, add this line.
compile group: "com.soasta.touchtest", name: "touchtestdriver", version: "1.0-SNAPSHOT", changing: true
}
task wrapper(type: Wrapper) {
gradleVersion = '2.6'
}