Skip to content
deaed1f
@artem-zinnatullin @nikitin-da @geralt-encore
132 lines (104 sloc) 5.7 KB
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
// Android Gradle plugin
classpath 'com.android.tools.build:gradle:1.5.0'
// Resolves android-sdk dependencies
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
// APT compile-time annotation processing
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
// Jacoco Test Coverage Plugin
// (addition to standard Jacoco plugin, allows us fail the build if coverage is not enough)
// https://github.com/palantir/gradle-jacoco-coverage
classpath 'com.palantir:jacoco-coverage:0.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
// Workaround for preventing Gradle from stealing focus from other apps
// https://gist.github.com/artem-zinnatullin/4c250e04636e25797165
tasks.withType(JavaForkOptions) {
jvmArgs '-Djava.awt.headless=true'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.9'
}
ext {
buildToolsVersion = '23.0.1'
compileSdkVersion = 23
minSdkVersion = 14
}
def supportLibsVersion = '23.1.0'
def daggerVersion = '2.0.1'
ext.libraries = [
// Core libraries
supportAnnotations : 'com.android.support:support-annotations:' + supportLibsVersion,
rxJava : 'io.reactivex:rxjava:1.1.1',
// Parts of StorIO
storIOCommon : project(':storio-common'),
storIOSQLite : project(':storio-sqlite'),
storIOContentResolver : project(':storio-content-resolver'),
storIOSQLiteAnnotations : project(':storio-sqlite-annotations'),
storIOContentResolverAnnotations : project(':storio-content-resolver-annotations'),
storIOCommonAnnotationsProcessor : project(':storio-common-annotations-processor'),
storIOSQLiteAnnotationsProcessor : project(':storio-sqlite-annotations-processor'),
storIOContentResolverAnnotationsProcessor : project(':storio-content-resolver-annotations-processor'),
storIOTestCommon : project(':storio-test-common'),
// Libraries for tests and sample app
junit : 'junit:junit:4.12',
assertJ : 'org.assertj:assertj-core:1.7.1',
assertJAndroid : 'com.squareup.assertj:assertj-android:1.0.1',
mockitoCore : 'org.mockito:mockito-core:1.10.19',
powerMockJUnit : 'org.powermock:powermock-module-junit4:1.6.2',
powerMockMockito : 'org.powermock:powermock-api-mockito:1.6.2',
equalsVerifier : 'nl.jqno.equalsverifier:equalsverifier:1.7.2',
privateConstructorChecker : 'com.pushtorefresh.java-private-constructor-checker:checker:1.1.0',
guava : 'com.google.guava:guava:18.0',
robolectric : 'org.robolectric:robolectric:3.0',
dagger : 'com.google.dagger:dagger:' + daggerVersion,
daggerCompiler : 'com.google.dagger:dagger-compiler:' + daggerVersion,
javaxInject : 'javax.inject:javax.inject:1',
javaxAnnotationApi : 'javax.annotation:javax.annotation-api:1.2',
butterKnife : 'com.jakewharton:butterknife:7.0.1',
appCompat : 'com.android.support:appcompat-v7:' + supportLibsVersion,
recyclerView : 'com.android.support:recyclerview-v7:' + supportLibsVersion,
rxAndroid : 'io.reactivex:rxandroid:1.0.1',
timber : 'com.jakewharton.timber:timber:3.0.1',
leakCanary : 'com.squareup.leakcanary:leakcanary-android:1.3.1',
leakCanaryNoOp : 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1',
autoService : 'com.google.auto.service:auto-service:1.0-rc2',
javaPoet : 'com.squareup:javapoet:1.2.0',
intellijAnnotations : 'com.intellij:annotations:12.0',
autoParcel : 'com.github.frankiesardo:auto-parcel:0.3',
autoParcelProcessor : 'com.github.frankiesardo:auto-parcel-processor:0.3'
]
// Option to disable Pre-Dexing on CI env
project.ext.preDexLibs = !project.hasProperty('disablePreDex')
subprojects {
project.plugins.whenPluginAdded { plugin ->
if ('com.android.build.gradle.AppPlugin'.equals(plugin.class.name)
|| 'com.android.build.gradle.LibraryPlugin'.equals(plugin.class.name)) {
// enable or disable pre-dexing
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
// treat all Android Lint warning in all sub-projects as errors
project.android.lintOptions.warningsAsErrors = true
// StorIO should support Java 6
project.android.compileOptions.sourceCompatibility = JavaVersion.VERSION_1_6
project.android.compileOptions.targetCompatibility = JavaVersion.VERSION_1_6
project.android.testOptions.unitTests.all {
testLogging {
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
exceptionFormat 'full'
}
}
}
}
}
Something went wrong with that request. Please try again.