-
Notifications
You must be signed in to change notification settings - Fork 49
/
build.gradle
173 lines (146 loc) · 6.63 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
apply plugin: 'com.android.application'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
kapt {
correctErrorTypes = true
}
androidExtensions {
experimental = true
}
tasks.whenTaskAdded { task ->
if (task.name == 'assembleRelease')
task.dependsOn('test')
}
static def getBugsnagKey() {
return System.getenv('BUGSNAG_API_KEY') ? System.getenv('BUGSNAG_API_KEY') : ''
}
static def isWeeklyBuild() {
return System.getenv('TRAVIS_EVENT_TYPE') == "cron" ? "true" : "false"
}
android {
compileSdkVersion 28
defaultConfig {
applicationId "io.github.feelfreelinux.wykopmobilny"
minSdkVersion 15
targetSdkVersion 28
versionCode project.ext.versionMajor * 10000 + project.ext.versionMinor * 1000 + project.ext.versionPatch * 100 + project.ext.versionBuild
versionName "${project.ext.versionMajor}.${project.ext.versionMinor}.${project.ext.versionPatch}.${project.ext.versionBuild}"
multiDexEnabled true
def credentialsPropertiesFile = rootProject.file("credentials.properties")
def credentialsProperties = new Properties()
credentialsProperties.load(new FileInputStream(credentialsPropertiesFile))
buildConfigField "String", "IS_WEEKLY", "\"${isWeeklyBuild()}\""
buildConfigField "String", "BUGSNAG_KEY", "\"${getBugsnagKey()}\""
buildConfigField 'String', 'APP_SECRET', credentialsProperties['apiSecret']
buildConfigField 'String', 'APP_KEY', credentialsProperties['apiKey']
buildConfigField 'String', 'GOOGLE_KEY', credentialsProperties['googleKey']
resValue 'string', 'GOOGLE_API_KEY', credentialsProperties['googleKey']
}
signingConfigs {
ci {
keyAlias "key0"
keyPassword System.getenv('CI_KEYSTORE_PASSWORD')
storeFile file('../ci-release-keystore.jks')
storePassword System.getenv('CI_KEYSTORE_PASSWORD')
}
}
buildTypes {
release {
if(System.getenv('CI_KEYSTORE_PASSWORD')) signingConfig signingConfigs.ci
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
jumboMode true
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test.java.srcDirs += 'src/test/kotlin'
}
lintOptions {
abortOnError false
}
packagingOptions {
exclude 'META-INF/rxjava.properties'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'http://dl.bintray.com/jetbrains/markdown' }
maven { url "http://dl.bintray.com/piasy/maven" }
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin"
// Support library
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha02'
implementation "android.arch.work:work-runtime:1.0.0-beta03"
implementation 'androidx.exifinterface:exifinterface:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.preference:preference:1.1.0-alpha02'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha03'
implementation "androidx.preference:preference:1.1.0-alpha02"
implementation 'com.takisoft.preferencex:preferencex:1.0.0-alpha2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.gms:play-services-gcm:11.8.0' // DO NOT DOWNGRADE, GOOGLE'S FAULT GH#415
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.devbrackets.android:exomedia:4.1.0'
implementation 'com.google.android.exoplayer:extension-okhttp:2.6.0'
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'androidx.core:core-ktx:1.1.0-alpha04'
// Utils
implementation 'com.bugsnag:bugsnag-android:4.5.0'
implementation "org.ocpsoft.prettytime:prettytime:$versions.prettytime"
implementation 'com.github.chrisbanes:PhotoView:2.1.3'
implementation 'com.pavelsikun:material-seekbar-preference:2.3.0'
implementation 'com.github.feelfreelinux:Slidr:2.2.1'
// Retrofit
implementation "com.squareup.retrofit2:retrofit:$versions.retrofit"
implementation "com.squareup.retrofit2:converter-jackson:$versions.retrofit"
implementation "com.squareup.retrofit2:adapter-rxjava2:$versions.retrofit"
implementation "com.squareup.okhttp3:logging-interceptor:$versions.okhttp_interceptor"
implementation 'pl.droidsonroids:jspoon:1.3.0'
implementation 'pl.droidsonroids.retrofit2:converter-jspoon:1.3.0'
// RxJava
implementation "io.reactivex.rxjava2:rxandroid:2.1.0"
implementation "io.reactivex.rxjava2:rxjava:$versions.rxjava"
implementation 'com.jakewharton.threetenabp:threetenabp:1.0.5'
implementation 'org.jetbrains:markdown:0.1.28'
// AppUpdater
implementation "com.github.javiersantos:AppUpdater:$versions.appUpdater"
// Dagger 2
implementation 'com.google.dagger:dagger:2.16'
kapt "com.google.dagger:dagger-compiler:2.16"
kapt "com.google.dagger:dagger-android-processor:2.21"
implementation 'com.google.dagger:dagger-android:2.16'
implementation 'com.google.dagger:dagger-android-support:2.16'
implementation 'com.github.tbruyelle:rxpermissions:0.10.2'
compileOnly 'org.glassfish:javax.annotation:10.0-b28'
// Glide
implementation "com.github.bumptech.glide:glide:$versions.glide"
kapt "com.github.bumptech.glide:compiler:$versions.glide"
implementation "com.github.bumptech.glide:okhttp3-integration:$versions.glide"
// Android-Job
implementation "com.evernote:android-job:$versions.androidjob"
implementation 'com.github.suckgamony.RapidDecoder:library:7cdfca47fa'
// Unit tests
testImplementation "org.mockito:mockito-core:$versions.mockito"
testImplementation "com.nhaarman:mockito-kotlin:$versions.mockito_kotlin"
testImplementation 'junit:junit:4.12'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0-alpha3', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation files('libs/YouTubeAndroidPlayerApi.jar')
}