This repository has been archived by the owner on May 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
233 lines (193 loc) · 6.12 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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
buildscript {
ext {
bintrayRepo = 'ArchData'
bintrayName = 'ArchData'
publishedGroupId = 'me.ibrahimyilmaz'
libraryName = 'ArchData'
artifact = 'ArchData'
libraryDescription = 'LiveData types for Publishing and Replaying Data'
siteUrl = 'https://github.com/ibrahimyilmaz/ArchData'
gitUrl = 'https://github.com/ibrahimyilmaz/ArchData.git'
libraryVersion = '0.0.5'
developerId = 'ibrahimyilmaz'
developerName = 'Ibrahim Yilmaz'
developerEmail = '[email protected]'
licenseName = 'MIT License'
licenseUrl = 'https://github.com/ibrahimyilmaz/ArchData/blob/master/LICENCE'
allLicenses = ["MIT"]
}
ext.lib_version = [
kotlin : '1.3.0',
lifecycle : '2.0.0',
mockito : '2.10.0',
mockitoKotlin: "2.0.0-RC1"
]
ext.libraries = [
kotlin : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$lib_version.kotlin",
mockito : "org.mockito:mockito-core:$lib_version.mockito",
mockitoKotlin: "com.nhaarman.mockitokotlin2:mockito-kotlin:$lib_version.mockitoKotlin"
]
ext.libraries.lifeCycle = [
extensions: "androidx.lifecycle:lifecycle-extensions:$lib_version.lifecycle",
viewModel : "androidx.lifecycle:lifecycle-viewmodel-ktx:$lib_version.lifecycle",
runTime : "androidx.lifecycle:lifecycle-runtime:$lib_version.lifecycle",
compiler : "androidx.lifecycle:lifecycle-compiler:$lib_version.lifecycle",
testing : "androidx.arch.core:core-testing:$lib_version.lifecycle"
]
ext.dependencies_version = [
gradle: '3.3.2',
]
ext.build_dependencies = [
gradle: "com.android.tools.build:gradle:$dependencies_version.gradle",
kotlin: "org.jetbrains.kotlin:kotlin-gradle-plugin:$lib_version.kotlin"
]
repositories {
google()
jcenter()
}
dependencies {
classpath build_dependencies.gradle
classpath build_dependencies.kotlin
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
allprojects {
repositories {
google()
jcenter()
}
tasks.withType(Javadoc) {
enabled = false
}
}
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 14
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath false
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
}
lintOptions {
ignore 'InvalidPackage'
}
}
android.testOptions.unitTests.all {
// Configure whether failing tests should fail the build
ignoreFailures false
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation libraries.kotlin
implementation libraries.lifeCycle.extensions
implementation libraries.lifeCycle.viewModel
implementation libraries.lifeCycle.runTime
implementation libraries.lifeCycle.compiler
kapt libraries.lifeCycle.compiler
testImplementation libraries.mockito
testImplementation libraries.mockitoKotlin
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
testImplementation libraries.lifeCycle.testing
}
repositories {
mavenCentral()
}
group = publishedGroupId
version = libraryVersion
install {
repositories.mavenInstaller {
pom.project {
packaging 'aar'
groupId publishedGroupId
artifactId artifact
name libraryName
description libraryDescription
url siteUrl
licenses {
license {
name licenseName
url licenseUrl
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
bintray {
user = System.getenv('bintray_user')
key = System.getenv('bintray_apikey')
configurations = ['archives']
System.out.println('archives')
pkg {
repo = bintrayRepo
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
dryRun = false
publish = true
override = false
publicDownloadNumbers = true
version {
desc = libraryDescription
}
}
}