news-android/News-Android-App/build.gradle

178 lines
5.1 KiB
Groovy
Raw Normal View History

2014-07-04 09:34:27 +00:00
apply plugin: 'com.android.application'
2014-11-08 11:53:00 +00:00
apply plugin: 'robolectric'
buildscript {
repositories {
mavenCentral()
}
dependencies {
2014-12-27 11:06:02 +00:00
classpath 'org.robolectric:robolectric-gradle-plugin:0.14.+'
2014-11-08 11:53:00 +00:00
}
}
android {
2014-06-23 19:41:56 +00:00
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
defaultConfig {
2014-06-23 19:41:56 +00:00
minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
2014-11-08 11:53:00 +00:00
testInstrumentationRunner "com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner"
}
2014-06-23 19:41:56 +00:00
buildTypes {
release {
2014-12-27 11:06:02 +00:00
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
2014-11-08 11:53:00 +00:00
productFlavors {
}
sourceSets {
main {
2014-06-06 07:19:59 +00:00
aidl.srcDirs = ['src/main/java']
}
2014-11-08 11:53:00 +00:00
instrumentTest.setRoot('src/androidTest/java')
androidTest {
java.srcDir file('src/androidTest/java')
setRoot('src/androidTest/')
}
}
lintOptions {
2014-07-07 20:27:08 +00:00
//checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
2014-11-08 11:53:00 +00:00
abortOnError false
}
}
2014-11-08 11:53:00 +00:00
configurations {
robolectricTests {
extendsFrom compile
}
}
sourceSets {
robolectricTests {
java.srcDir file('src/androidTest/java')
resources.srcDir file('src/androidTest/resources')
compileClasspath += configurations.robolectricTests
runtimeClasspath += compileClasspath
}
}
2014-07-04 09:34:27 +00:00
configurations.all {
resolutionStrategy {
2014-11-29 18:12:14 +00:00
force 'com.android.support:support-v4:21.+'
force 'com.android.support:appcompat-v7:21.+'
2014-07-04 09:34:27 +00:00
}
}
2014-11-08 11:53:00 +00:00
dependencies {
2014-04-20 13:54:33 +00:00
// You must install or update the Google Repository through the SDK manager to use this dependency.
// The Google Repository (separate from the corresponding library) can be found in the Extras category.
// compile 'com.google.android.gms:play-services:4.2.42'
compile files('src/main/libs/gson-2.2.4.jar')
compile files('src/main/libs/jsoup-1.7.2.jar')
compile project(':Changeloglib:ChangeLogLibrary')
compile project(':MessageBar')
2014-06-06 07:19:59 +00:00
compile project(':ownCloud-Account-Importer')
compile project(':ShowcaseView:library')
2014-09-02 09:11:39 +00:00
compile project(':android-HoloCircularProgressBar:library')
2014-11-29 18:12:14 +00:00
compile 'com.android.support:support-v4:21.+'
compile 'com.android.support:appcompat-v7:21.+'
2014-06-23 19:41:56 +00:00
compile 'com.jakewharton:butterknife:5.1.+'
compile 'com.squareup.picasso:picasso:2.3.1@jar'
compile 'com.sothree.slidinguppanel:library:+'
compile 'de.greenrobot:eventbus:2.2.1'
compile 'de.greenrobot:greendao:1.3.7@jar'
compile 'de.greenrobot:greendao-generator:1.3.1@jar'
compile 'org.freemarker:freemarker:2.3.18@jar'
2014-11-08 11:53:00 +00:00
androidTestCompile 'org.hamcrest:hamcrest-integration:1.1'
androidTestCompile 'org.hamcrest:hamcrest-core:1.1'
androidTestCompile 'org.hamcrest:hamcrest-library:1.1'
androidTestCompile('org.robolectric:robolectric:2.+'){
exclude module: 'classworlds'
exclude module: 'maven-artifact'
exclude module: 'maven-artifact-manager'
exclude module: 'maven-error-diagnostics'
exclude module: 'maven-model'
exclude module: 'maven-plugin-registry'
exclude module: 'maven-profile'
exclude module: 'maven-project'
exclude module: 'maven-settings'
exclude module: 'nekohtml'
exclude module: 'plexus-container-default'
exclude module: 'plexus-interpolation'
exclude module: 'plexus-utils'
exclude module: 'wagon-file'
exclude module: 'wagon-http-lightweight'
exclude module: 'wagon-http-shared'
exclude module: 'wagon-provider-api'
exclude group: 'com.android.support', module: 'support-v4'
}
androidTestCompile('junit:junit:4.+') {
exclude module: 'hamcrest-core'
}
androidTestCompile 'com.squareup.assertj:assertj-android:+'
}
apply plugin: 'idea'
idea {
module {
testOutputDir = file('build/test-classes')
}
}
/*
task robolectric(type: Test, dependsOn: assemble) {
workingDir 'src/main'
testClassesDir = sourceSets.robolectricTests.output.classesDir
android.sourceSets.main.java.srcDirs.each { dir ->
def buildDir = dir.getAbsolutePath().split('/')
buildDir = (buildDir[0..(buildDir.length - 4)] + ['build', 'classes', 'debug']).join('/')
project.getPlugins().getPlugin('android').prepareTaskMap.each {
sourceSets.robolectricTests.compileClasspath += files(it.value.explodedDir.getAbsolutePath() + '/classes.jar')
sourceSets.robolectricTests.runtimeClasspath += files(it.value.explodedDir.getAbsolutePath() + '/classes.jar')
}
sourceSets.robolectricTests.compileClasspath += files(buildDir)
sourceSets.robolectricTests.runtimeClasspath += files(buildDir)
}
classpath = sourceSets.robolectricTests.runtimeClasspath
}
2014-11-08 11:53:00 +00:00
*/