Skip to content
Snippets Groups Projects
Commit cfecfe48 authored by Matyáš Latner's avatar Matyáš Latner
Browse files

#9 Initial Spoon test

parent 86d0a27a
No related merge requests found
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath('com.stanfy.spoon:spoon-gradle-plugin:0.14.1') {
exclude module: 'commons-io'
}
classpath 'commons-io:commons-io:2.4'
}
}
android {
buildToolsVersion "21.1.2"
compileSdkVersion 21
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
java.srcDirs = ['src/main/java']
aidl.srcDirs = ['src/main/java']
renderscript.srcDirs = ['src/main/java']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
androidTest {
java.srcDirs = ['src/test/java']
}
}
}
......@@ -72,8 +85,11 @@ eclipse {
// ignores any nodes added in classpath.file.withXml
sourceSets {
main {
java.srcDirs "src", 'gen'
java.srcDirs "src/main/java", 'gen'
}
androidTest {
java.srcDirs "src/test/java"
}
}
jdt {
......@@ -83,6 +99,7 @@ eclipse {
classpath {
plusConfigurations += [ project.configurations.compile ]
plusConfigurations += [ project.configurations.androidTestCompile ]
containers 'com.android.ide.eclipse.adt.ANDROID_FRAMEWORK', 'com.android.ide.eclipse.adt.LIBRARIES'
}
......@@ -100,7 +117,7 @@ eclipse {
// sets up the Android Idea project, using the old Ant based build.
idea {
module {
sourceDirs += file("src");
sourceDirs += file("src/main/java");
scopes = [ COMPILE: [plus:[project.configurations.compile]]]
iml {
......
package cz.nic.tablexia.android.test;
import android.test.ActivityInstrumentationTestCase2;
import android.test.UiThreadTest;
import com.squareup.spoon.Spoon;
import cz.nic.tablexia.android.AndroidLauncher;
public class ScreenTest extends ActivityInstrumentationTestCase2<AndroidLauncher> {
public ScreenTest() {
super(AndroidLauncher.class);
}
@UiThreadTest
public void screenTest() throws Throwable {
final AndroidLauncher act = getActivity();
Spoon.screenshot(act, "startup");
}
}
......@@ -7,6 +7,10 @@ buildscript {
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
classpath 'com.android.tools.build:gradle:1.0.0'
classpath 'org.robovm:robovm-gradle-plugin:1.0.0-beta-01'
classpath('com.stanfy.spoon:spoon-gradle-plugin:0.14.1') {
exclude module: 'commons-io'
}
classpath 'commons-io:commons-io:2.4'
}
}
......@@ -19,7 +23,7 @@ allprojects {
appName = 'Tablexia-libGDX'
gdxVersion = '1.5.2'
gdxUtilsVersion = '0.9.1'
mbassadorVersion = '1.2.0'
mbassadorVersion = '1.2.0'
roboVMVersion = '1.0.0-beta-01'
box2DLightsVersion = '1.3'
ashleyVersion = '1.3.1'
......@@ -49,17 +53,20 @@ project(":desktop") {
project(":android") {
apply plugin: "android"
apply plugin: "spoon"
configurations { natives }
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
compile "net.engio:mbassador:$mbassadorVersion"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
compile "net.engio:mbassador:$mbassadorVersion"
androidTestCompile "com.squareup.spoon:spoon-client:1.1.0"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment