build.gradle
3.8 KB
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
plugins {
id "org.jetbrains.dokka"
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
}
android {
namespace 'io.livekit.android.test'
compileSdkVersion androidSdk.compileVersion
defaultConfig {
minSdkVersion androidSdk.minVersion
targetSdkVersion androidSdk.targetVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility java_version
targetCompatibility java_version
}
kotlinOptions {
freeCompilerArgs = ["-Xinline-classes", "-opt-in=kotlin.RequiresOptIn", "-opt-in=io.livekit.android.annotations.Beta"]
jvmTarget = java_version
}
testOptions {
unitTests {
includeAndroidResources = true
}
}
lint {
disable 'VisibleForTests'
}
}
dokkaHtml {
moduleName.set("livekit-android-test")
dokkaSourceSets {
configureEach {
skipEmptyPackages.set(true)
includeNonPublic.set(false)
includes.from("module.md")
displayName.set("LiveKit Mocks")
sourceLink {
localDirectory.set(file("src/main/java"))
// URL showing where the source code can be accessed through the web browser
remoteUrl.set(new URL(
"https://github.com/livekit/client-sdk-android/tree/master/livekit-android-test/src/main/java"))
// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#L")
}
perPackageOption {
matchingRegex.set(".*\\.dagger.*")
suppress.set(true)
}
perPackageOption {
matchingRegex.set(".*\\.util.*")
suppress.set(true)
}
}
}
}
dependencies {
implementation(project(":livekit-android-sdk"))
implementation libs.timber
implementation libs.coroutines.lib
implementation libs.kotlinx.serialization.json
api libs.okhttp.lib
api libs.audioswitch
implementation libs.androidx.annotation
api libs.protobuf.javalite
implementation libs.android.jain.sip.ri
implementation libs.junit
implementation libs.robolectric
implementation libs.mockito.core
implementation libs.mockito.kotlin
implementation libs.mockito.inline
implementation libs.androidx.test.core
implementation libs.coroutines.test
implementation libs.dagger.lib
implementation libs.byte.buddy
kapt libs.dagger.compiler
testImplementation libs.junit
testImplementation libs.robolectric
testImplementation libs.okhttp.mockwebserver
kaptTest libs.dagger.compiler
androidTestImplementation libs.androidx.test.junit
androidTestImplementation libs.espresso
}
tasks.withType(Test).configureEach {
systemProperty "robolectric.logging.enabled", true
}
apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
apply from: rootProject.file('gradle/dokka-kotlin-dep-fix.gradle')
afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
// Applies the component for the release build variant.
from components.release
// You can then customize attributes of the publication as shown below.
groupId = GROUP
artifactId = POM_ARTIFACT_ID
version = VERSION_NAME
}
}
}
}