forked from semaphoreci-demos/semaphore-demo-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
119 lines (99 loc) · 3.87 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.github.triplet.play'
android {
compileSdkVersion 30
buildToolsVersion "30.0.1"
defaultConfig {
applicationId "com.semaphoreci.demo"
minSdkVersion 21
targetSdkVersion 30
versionCode System.getenv("SEMAPHORE_WORKFLOW_NUMBER")?.toInteger() ?: 1
versionName "1.0.${System.getenv("SEMAPHORE_WORKFLOW_NUMBER") ?: 0}"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
release {
storeFile file("release-keystore.jks")
storePassword System.getenv("RELEASE_KEYSTORE_PASSWORD")
keyAlias System.getenv("RELEASE_KEY_ALIAS")
keyPassword System.getenv("RELEASE_KEY_PASSWORD")
}
}
buildTypes {
debug {
testCoverageEnabled true
}
release {
minifyEnabled false
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize' +
'.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
viewBinding true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
play {
track "internal"
fromTrack "internal"
promoteTrack "beta"
defaultToAppBundles true
serviceAccountCredentials file("service-account-key.json")
}
dependencies {
// Local
implementation fileTree(dir: "libs", include: ["*.jar"])
// Kotlin
def coroutines_version = "1.3.7"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains" +
".kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains" +
".kotlinx:kotlinx-coroutines-android:$coroutines_version"
// Android
def lifecycle_version = "2.2.0"
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation "androidx" +
".lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx" +
".lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation 'androidx.activity:activity-ktx:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta8'
implementation 'com.google.android.material:material:1.1.0'
// Network
def retrofit_version = "2.9.0"
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
implementation 'com.github.haroldadmin:NetworkResponseAdapter:4.0.1'
// Testing
def mockk_version = "1.10.0"
def core_testing_version = "1.2.0"
def espresso_version = "3.2.0"
testImplementation 'junit:junit:4.13'
testImplementation "org.jetbrains" +
".kotlinx:kotlinx-coroutines-test:$coroutines_version"
testImplementation "io.mockk:mockk:$mockk_version"
testImplementation "io.mockk:mockk-android:$mockk_version"
testImplementation 'com.squareup.okhttp3:mockwebserver:4.7.2'
androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.1'
androidTestImplementation "androidx.test:core-ktx:$core_testing_version"
androidTestImplementation "androidx.test:rules:$core_testing_version"
androidTestImplementation "androidx.test:runner:$core_testing_version"
androidTestImplementation "androidx.test" +
".espresso:espresso-core:$espresso_version"
androidTestImplementation "androidx.test" +
".espresso:espresso-intents:$espresso_version"
androidTestImplementation "androidx.test" +
".espresso:espresso-contrib:$espresso_version"
}