Skip to content

Commit d7bbcfd

Browse files
Updated gradle to use robolectric
1 parent a427c9e commit d7bbcfd

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

FFmpegAndroid/build.gradle

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'robolectric'
23

34
android {
45
compileSdkVersion 19
@@ -12,6 +13,13 @@ android {
1213
versionName "0.2.2"
1314
}
1415

16+
packagingOptions {
17+
exclude 'LICENSE.txt'
18+
exclude 'META-INF/LICENSE'
19+
exclude 'META-INF/LICENSE.txt'
20+
exclude 'META-INF/NOTICE'
21+
}
22+
1523
sourceSets.main {
1624
assets.srcDirs = ['assets']
1725
jni.srcDirs = [] //disable automatic ndk-build
@@ -28,6 +36,32 @@ android {
2836

2937
dependencies {
3038
compile fileTree(dir: 'libs', include: ['*.jar'])
39+
40+
androidTestCompile('junit:junit:4.11') {
41+
exclude module: 'hamcrest-core'
42+
}
43+
44+
androidTestCompile 'org.hamcrest:hamcrest-integration:1.1'
45+
androidTestCompile 'org.hamcrest:hamcrest-core:1.1'
46+
androidTestCompile 'org.hamcrest:hamcrest-library:1.1'
47+
48+
androidTestCompile('org.robolectric:robolectric:2.3') {
49+
exclude module: 'classworlds'
50+
exclude module: 'commons-logging'
51+
exclude module: 'httpclient'
52+
exclude module: 'maven-artifact'
53+
exclude module: 'maven-artifact-manager'
54+
exclude module: 'maven-error-diagnostics'
55+
exclude module: 'maven-model'
56+
exclude module: 'maven-project'
57+
exclude module: 'maven-settings'
58+
exclude module: 'plexus-container-default'
59+
exclude module: 'plexus-interpolation'
60+
exclude module: 'plexus-utils'
61+
exclude module: 'wagon-file'
62+
exclude module: 'wagon-http-lightweight'
63+
exclude module: 'wagon-provider-api'
64+
}
3165
}
3266

3367
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ buildscript {
66
}
77
dependencies {
88
classpath 'com.android.tools.build:gradle:0.12.2'
9+
classpath 'org.robolectric:robolectric-gradle-plugin:0.12.+'
910

1011
// NOTE: Do not place your application dependencies here; they belong
1112
// in the individual module build.gradle files

0 commit comments

Comments
 (0)