This repository has been archived by the owner on Apr 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
149 lines (128 loc) · 4.06 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
buildscript {
ext.kotlin_version = '1.3.31'
repositories {
jcenter()
google()
}
dependencies {
classpath "com.android.tools.build:gradle:3.4.1"
classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id "com.jfrog.bintray" version "1.7.3"
}
allprojects {
repositories {
google()
jcenter()
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
}
version = "${VERSION_NAME}"
group = "${GROUP_ID}"
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "${VERSION_NAME}"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
apply from: 'gradle/src/checkstyle.gradle'
dependencies {
String retrofitVersion = '2.4.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.core:core:1.0.2"
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
implementation "io.reactivex.rxjava2:rxjava:2.2.3"
implementation "io.reactivex.rxjava2:rxandroid:2.1.0"
implementation 'org.apache.commons:commons-lang3:3.8.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.8.9'
testImplementation 'org.robolectric:robolectric:3.8'
testImplementation "com.squareup.okhttp3:mockwebserver:3.12.1"
testImplementation "commons-io:commons-io:2.6"
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
artifacts {
archives sourcesJar
}
Properties properties = new Properties()
if ( project.rootProject.file('local.properties').isFile() ) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
}
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
println 'Bintray user: ' + user
configurations = ['archives']
pkg {
repo = 'maven'
name = "${ARTIFACT_ID}"
vcsUrl = 'https://github.com/wikimedia/wikimedia-android-data-client.git'
licenses = ['Apache-2.0']
version {
name = "${VERSION_NAME}"
}
publish = true
}
}
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
name "${ARTIFACT_ID}"
artifactId "${ARTIFACT_ID}"
description 'Android library for accessing the Wikimedia APIs.'
url 'https://github.com/wikimedia/wikimedia-android-data-client'
inceptionYear '2019'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'dmitrybrant'
name 'Dmitry Brant'
email '[email protected]'
}
}
}
}
}
}
repositories {
mavenCentral()
}