Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2015-02-27 20:31:21 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:46:03 +0300
commitc5a45d38c2060c1b8722a387031bef03cabdc9e6 (patch)
treecfbcac93439a272583e96657c5d17caaae8c97b5 /android/UnitTests/build.gradle
parentb6db1697139223354c36524605eb13cbdc2f9f15 (diff)
Developing infrastucture for launching integration tests and unit tests for Android. Porting integration tests and indexer tests on Android platform.
Diffstat (limited to 'android/UnitTests/build.gradle')
-rw-r--r--android/UnitTests/build.gradle110
1 files changed, 110 insertions, 0 deletions
diff --git a/android/UnitTests/build.gradle b/android/UnitTests/build.gradle
new file mode 100644
index 0000000000..c7d09e5619
--- /dev/null
+++ b/android/UnitTests/build.gradle
@@ -0,0 +1,110 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:1.1.+'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
+
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion propTargetSdkVersion.toInteger()
+ buildToolsVersion propBuildToolsVersion
+
+ defaultConfig {
+ // Default package name is taken from the manifest and should be com.mapswithme.maps.unittests
+ versionCode propVersionCode.toInteger()
+ versionName propVersionName
+ minSdkVersion propMinSdkVersion.toInteger()
+ targetSdkVersion propTargetSdkVersion.toInteger()
+ }
+
+ sourceSets.main {
+ manifest.srcFile 'AndroidManifest.xml'
+ res.srcDirs = ['res']
+ java.srcDirs = ['src']
+ assets.srcDirs = ['assets']
+ jniLibs.srcDirs = ['libs']
+ }
+
+ signingConfigs {
+ mapswithme {
+ storeFile file('../../tools/android/mapswithmetests.keystore')
+ storePassword 'ITHOrMARopHE'
+ keyAlias 'mapswithmetests'
+ keyPassword 'ITHOrMARopHE'
+ }
+ }
+
+ buildTypes {
+ debug {
+ applicationIdSuffix '.debug' // Allows to install debug and release builds together
+ versionNameSuffix '-debug'
+ jniDebuggable true // Enable jni debug build
+ zipAlignEnabled true
+ }
+
+ release {
+ signingConfig signingConfigs.mapswithme
+ minifyEnabled true
+ shrinkResources true
+ proguardFile('proguard-mwm.txt')
+ }
+ }
+
+ // We don't compress these extensions in assets/ because our random FileReader can't read zip-compressed files from apk
+ aaptOptions {
+ noCompress 'txt', 'bin', 'skn', 'html', 'png', 'json', 'mwm', 'ttf'
+ ignoreAssetsPattern "!.svn:!.git:!.DS_Store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"
+ }
+
+ // Enables new Java features in KitKat+ but needs Java 1.7 installed
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_7
+ targetCompatibility JavaVersion.VERSION_1_7
+ }
+}
+
+def NUM_OF_PARALLEL_MAKE_TASKS = Runtime.runtime.availableProcessors() + 1
+def INTEGRATION_TESTS_BUILD = '../../integration_tests/'
+Properties properties = new Properties()
+properties.load(project.rootProject.file('local.properties').newDataInputStream())
+def NDK_BUILD = properties.getProperty('ndk.dir') + '/ndk-build'
+
+// Building all static libraries
+task cppLibsBuildDebug(type: Exec, description: 'Building DEBUG version of static C++ libraries') {
+ commandLine 'bash', './native_build.sh', 'debug'
+}
+
+task cppLibsBuildRelease(type: Exec, description: 'Building RELEASE/PRODUCTION version of static C++ libraries') {
+ commandLine 'bash', './native_build.sh', 'production'
+}
+
+tasks.withType(JavaCompile) { compileTask ->
+ if (compileTask.name.contains('Release')) {
+ compileTask.dependsOn cppLibsBuildRelease
+ } else {
+ compileTask.dependsOn cppLibsBuildDebug
+ }
+}
+
+// Cleaning ndk
+task cppLibsClean(type: Exec, description: 'Clean native libraries') {
+ commandLine 'bash', './native_clean.sh'
+}
+
+clean.dependsOn 'cppLibsClean'
+