Gradle: activate Android test framework

This commit is contained in:
Peter Siegmund
2015-01-26 10:35:32 +01:00
parent 621378ca36
commit 0d35dfa40b
5 changed files with 56 additions and 12 deletions
+6
View File
@@ -612,6 +612,12 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
if [[ $? != 0 ]]; then
exit 100
fi
if [ $testing -eq 1 ]; then
./gradlew connectedAndroidTest
if [[ $? != 0 ]]; then
exit 101
fi
fi
else
echo "INFO: Deactivating mobile modules"
extra="$extra -P !with-mobile"
@@ -21,16 +21,22 @@ android {
manifest.srcFile "AndroidManifest.xml"
java.srcDirs = ["src"]
res.srcDirs = ["res"]
assets.srcDirs = ['assets']
assets.srcDirs = ["assets"]
}
androidTest {
java.srcDirs = ["tests/src"]
res.srcDirs = ["tests/res"]
assets.srcDirs = ["tests/assets"]
}
}
signingConfigs {
stg_debug {
keyAlias 'stg_debug'
keyPassword 'stg_debug'
storeFile file('../android-keystore/STG-debug.jks')
storePassword 'stg_debug'
keyAlias "stg_debug"
keyPassword "stg_debug"
storeFile file("../android-keystore/STG-debug.jks")
storePassword "stg_debug"
}
}
@@ -63,7 +69,7 @@ dependencies {
compile "com.android.support:appcompat-v7:21.0.3"
/* Google Play Services */
compile 'com.google.android.gms:play-services-location:6.5.87'
compile "com.google.android.gms:play-services-location:6.5.87"
/* local dependencies */
compile project(":mobile:com.sap.sailing.android.shared")
@@ -0,0 +1,13 @@
package com.sap.sailing.android.tracking.app;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
@@ -21,16 +21,22 @@ android {
manifest.srcFile "AndroidManifest.xml"
java.srcDirs = ["src"]
res.srcDirs = ["res"]
assets.srcDirs = ['assets']
assets.srcDirs = ["assets"]
}
androidTest {
java.srcDirs = ["tests/src"]
res.srcDirs = ["tests/res"]
assets.srcDirs = ["tests/assets"]
}
}
signingConfigs {
stg_debug {
keyAlias 'stg_debug'
keyPassword 'stg_debug'
storeFile file('../android-keystore/STG-debug.jks')
storePassword 'stg_debug'
keyAlias "stg_debug"
keyPassword "stg_debug"
storeFile file("../android-keystore/STG-debug.jks")
storePassword "stg_debug"
}
}
@@ -63,7 +69,7 @@ dependencies {
compile "com.android.support:recyclerview-v7:21.0.3"
/* Google Play Services */
compile 'com.google.android.gms:play-services-location:6.5.87'
compile "com.google.android.gms:play-services-location:6.5.87"
/* local dependencies */
compile project(":mobile:com.sap.sailing.android.shared")
@@ -0,0 +1,13 @@
package com.sap.sailing.racecommittee.app;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}