/
build.gradle
88 lines (72 loc) · 2.93 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
apply plugin: 'com.android.library'
apply plugin: 'de.mobilej.unmock'
apply plugin: 'jacoco-android'
apply plugin: "com.github.kt3k.coveralls"
apply from: "$rootDir/gradle/checkstyle.gradle"
Properties localProps = rootProject.getSigningProperties()
android {
defaultPublishConfig "release"
testBuildType "release"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
signingConfigs {
release {
storeFile file(localProps.getProperty('RELEASE_KEYSTORE_PATH', 'fillhere'))
storePassword localProps.getProperty('RELEASE_KEYSTORE_PW', '')
keyAlias localProps.getProperty('RELEASE_KEY_ALIAS', '')
keyPassword localProps.getProperty('RELEASE_KEY_PW', '')
}
}
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionNameLib
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
buildConfigField "String", "BUILD_NUMBER", "\"" + getCiBuildNumber() + "\""
buildConfigField "String", "BUILD_DATE", "\"" + getBuildTime() + "\""
buildConfigField "boolean", "NO_OP", "false"
consumerProguardFiles 'proguard-rules.pro'
signingConfig signingConfigs.release
}
buildTypes {
noop {
minifyEnabled false
buildConfigField "boolean", "NO_OP", "true"
}
release {
minifyEnabled false
}
}
unMock {
keepStartingWith "android.util"
keepStartingWith "com.android.internal"
keep "android.view.MotionEvent"
}
lintOptions {
abortOnError false
}
libraryVariants.all { variant ->
variant.outputs.all {
outputFileName = "${project.name}-${variant.name}-${version}.aar"
}
}
}
android.variantFilter { variant ->
if (variant.buildType.name == com.android.builder.core.BuilderConstants.DEBUG) {
variant.setIgnore(true)
}
}
dependencies {
implementation "com.android.support:support-compat:$rootProject.ext.dependencies.support"
implementation "com.android.support:support-core-utils:$rootProject.ext.dependencies.support"
implementation "com.android.support:recyclerview-v7:$rootProject.ext.dependencies.support"
implementation "com.jakewharton.timber:timber:$rootProject.ext.dependencies.timber"
implementation 'com.squareup:seismic:1.0.2'
androidTestImplementation(group: 'com.android.support.test.espresso', name: 'espresso-core', version: rootProject.ext.dependencies.espresso, {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation "junit:junit:$rootProject.ext.dependencies.junit"
unmock 'org.robolectric:android-all:4.3_r2-robolectric-0'
}
apply from: "$rootDir/gradle/publish.gradle"