Index: adblockplussbrowser/build.gradle |
=================================================================== |
--- a/adblockplussbrowser/build.gradle |
+++ b/adblockplussbrowser/build.gradle |
@@ -16,31 +16,40 @@ android { |
targetSdkVersion rootProject.ext.targetSdkVersion |
versionCode 11 |
versionName '1.1.1' |
} |
sourceSets { |
main { |
manifest.srcFile 'AndroidManifest.xml' |
- java.srcDirs = ['src'] |
+ java.srcDirs = ['src/main/java/'] |
res.srcDirs = ['res'] |
} |
+ test { |
+ java.srcDirs = ['src/test/java/'] |
+ } |
} |
buildTypes { |
release { |
minifyEnabled true |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
lintOptions { |
disable 'MissingTranslation' |
} |
} |
} |
+ testOptions { |
+ unitTests { |
+ includeAndroidResources = true |
+ } |
+ } |
+ |
afterEvaluate { project -> |
project.tasks.generateReleaseResources << { |
updateBundledLists() |
println('Bundled lists updated at ' + new Date().format('dd MMM yyyy, HH:mm:ss zzz')) |
} |
} |
} |
@@ -50,13 +59,16 @@ def updateBundledLists() { |
} |
new URL(rootProject.ext.exceptionRulesUpdateUrl).withInputStream { |
i -> new File(rootProject.ext.exceptionRulesFilePath).withOutputStream { it << i } |
} |
} |
dependencies { |
testCompile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlinVersion" |
+ testCompile 'junit:junit:4.12' |
+ testCompile 'org.mockito:mockito-core:2.11.0' |
+ testCompile 'org.robolectric:robolectric:3.5.1' |
compile "com.android.support:support-v4:$rootProject.ext.androidSupportLibraryVersion" |
compile (group: 'commons-validator', name: 'commons-validator', version: '+') { |
exclude group: 'commons-logging', module: 'commons-logging' |
} |
} |