/
build.gradle
129 lines (114 loc) · 3.72 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 'maven-publish'
}
group = "cloud.eppo"
version = "1.0.2"
android {
compileSdk 33
defaultConfig {
namespace "cloud.eppo.android"
minSdk 21
targetSdk 33
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
def EPPO_VERSION = "EPPO_VERSION"
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "String", EPPO_VERSION, "\"${project.properties.get("version")}\""
matchingFallbacks = ['release']
}
debug {
minifyEnabled false
buildConfigField "String", EPPO_VERSION, "\"${project.properties.get("version")}\""
matchingFallbacks = ['debug']
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
testOptions {
unitTests.returnDefaultValues = true
}
packagingOptions {
resources {
excludes += "META-INF/**"
}
}
}
ext {}
ext.versions = [
"junit": "4.13.2",
"mockito": "3.+",
"androidx_junit": "1.1.3",
"androidx_core": "1.5.0",
"androidx_runner": "1.5.2",
"gson": "2.9.1",
"okhttp": "4.10.0",
"commonsio": "2.14.0"
]
dependencies {
testImplementation "junit:junit:${versions.junit}"
testImplementation "org.mockito:mockito-core:${versions.mockito}"
androidTestImplementation "org.mockito:mockito-android:${versions.mockito}"
androidTestImplementation "androidx.test.ext:junit:${versions.androidx_junit}"
androidTestImplementation "androidx.test:core:${versions.androidx_core}"
androidTestImplementation "androidx.test:runner:${versions.androidx_runner}"
androidTestImplementation "commons-io:commons-io:${versions.commonsio}"
implementation("com.google.code.gson:gson:${versions.gson}")
implementation("com.squareup.okhttp3:okhttp:${versions.okhttp}")
implementation("com.github.zafarkhaja:java-semver:0.10.2")
}
publishing {
publications {
release(MavenPublication) {
groupId = 'cloud.eppo'
artifactId = 'android-sdk'
version = project.properties.get("version")
afterEvaluate {
from components.release
}
pom {
name = 'Eppo Android'
description = 'Eppo Android SDK'
url = 'https://github.com/Eppo-exp/android-sdk'
licenses {
license {
name = 'MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
name = 'Eppo'
email = 'https://www.geteppo.com'
}
}
scm {
connection = 'scm:git:git://github.com/Eppo-exp/android-sdk.git'
developerConnection = 'scm:git:ssh://github.com/Eppo-exp/android-sdk.git'
url = 'https://github.com/Eppo-exp/android-sdk/tree/main'
}
}
}
}
repositories {
maven {
credentials {
username = "$MAVEN_USERNAME"
password = "$MAVEN_PASSWORD"
}
url = "https://s01.oss.sonatype.org/content/repositories/releases"
}
}
}
task runEppoTests(type: GradleBuild) {
tasks = [
':eppo:testDebugUnitTest',
':eppo:connectedDebugAndroidTest'
]
}