-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
129 lines (108 loc) · 4.38 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
plugins {
id "com.android.library"
id "org.jetbrains.kotlin.android"
id "org.jetbrains.kotlin.kapt"
id "com.automattic.android.publish-to-s3"
}
repositories {
maven {
url "https://a8c-libs.s3.amazonaws.com/android"
content {
includeGroup "org.wordpress"
includeGroup "org.wordpress.fluxc"
includeGroup "org.wordpress.wellsql"
includeGroup "com.gravatar"
}
}
mavenCentral()
google()
jcenter()
maven { url "https://www.jitpack.io" }
}
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlin {
jvmToolchain(17)
}
namespace "org.wordpress.android.login"
compileSdkVersion rootProject.compileSdkVersion
defaultConfig {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
vectorDrawables.useSupportLibrary = true
}
buildFeatures {
buildConfig true
}
}
dependencies {
implementation ("org.wordpress:utils:$wordpressUtilsVersion") {
exclude group: "com.android.volley"
}
implementation ("com.gravatar:gravatar:$gravatarSdkVersion")
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "androidx.vectordrawable:vectordrawable-animated:$androidxVectorDrawableAnimatedVersion"
implementation "androidx.media:media:$androidxMediaVersion"
implementation "androidx.legacy:legacy-support-v13:$androidxLegacySupportV13Version"
implementation "androidx.gridlayout:gridlayout:$androidxGlidLayoutVersion"
implementation "androidx.constraintlayout:constraintlayout:$androidxConstraintLayoutVersion"
implementation "com.google.android.material:material:$materialVersion"
implementation "androidx.core:core-ktx:$androidxCoreVersion"
api "com.google.android.gms:play-services-auth:$playServicesAuthVersion"
implementation("org.wordpress:fluxc:$wordpressFluxCVersion") {
exclude group: "com.android.support"
exclude group: "org.wordpress", module: "utils"
}
implementation "com.github.bumptech.glide:glide:$glideVersion"
kapt "com.github.bumptech.glide:compiler:$glideVersion"
implementation "androidx.credentials:credentials:$credentialManagerVersion"
implementation "androidx.credentials:credentials-play-services-auth:$credentialManagerVersion"
// Dagger
implementation "com.google.dagger:dagger:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
compileOnly "org.glassfish:javax.annotation:$javaxAnnotationVersion"
implementation "com.google.dagger:dagger-android-support:$daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
lintChecks "org.wordpress:lint:$wordpressLintVersion"
testImplementation "junit:junit:$junitVersion"
testImplementation "org.mockito:mockito-core:$mockitoVersion"
testImplementation "androidx.arch.core:core-testing:$androidxArchCoreVersion"
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation "org.assertj:assertj-core:$assertjVersion"
}
// Add properties named "wp.xxx" to our BuildConfig
android.buildTypes.all { buildType ->
Properties gradleProperties = new Properties()
File propertiesFile = file("../gradle.properties")
if (propertiesFile.exists()) {
gradleProperties.load(new FileInputStream(propertiesFile))
} else {
// Load defaults
gradleProperties.load(new FileInputStream(file("../gradle.properties-example")))
}
gradleProperties.any { property ->
if (property.key.toLowerCase().startsWith("wp.")) {
buildType.buildConfigField "String", property.key.replace("wp.", "").replace(".", "_").toUpperCase(),
"\"${property.value}\""
}
if (property.key.toLowerCase().startsWith("wp.res.")) {
buildType.resValue "string", property.key.replace("wp.res.", "").replace(".", "_").toLowerCase(),
"${property.value}"
}
}
}
project.afterEvaluate {
publishing {
publications {
LoginPublication(MavenPublication) {
from components.release
groupId "org.wordpress"
artifactId "login"
// version is set by 'publish-to-s3' plugin
}
}
}
}