-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle
134 lines (115 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
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:$mm_gradlePluginVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$mm_kotlinVersion"
}
}
plugins {
id 'com.android.library'
id 'maven-publish'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.kapt'
}
android {
publishing {
multipleVariants {
allVariants()
withJavadocJar()
withSourcesJar()
}
}
defaultConfig {
minSdkVersion mm_minSdkVersion
targetSdkVersion 34
compileSdk mm_compileSdkVersion
buildToolsVersion = mm_buildToolsVersion
namespace "com.infobip.webrtc.ui"
// since AGP 4.1 "VERSION_NAME" is not included anymore to BuildConfig
// https://issuetracker.google.com/issues/154275579
buildConfigField "String", "VERSION_NAME", "\"$versionName\""
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "proguard-rules.pro"
}
buildFeatures {
viewBinding true
buildConfig true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
constraints {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
}
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
}
}
implementation "androidx.constraintlayout:constraintlayout:$mm_constraintLayoutVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$mm_kotlinVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$mm_lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$mm_lifecycleVersion"
implementation "androidx.fragment:fragment-ktx:1.5.4"
implementation project(":infobip-mobile-messaging-android-sdk")
implementation "androidx.core:core-ktx:$mm_coreKtxVersion"
implementation "androidx.appcompat:appcompat:$mm_appCompatVersion"
implementation "com.google.android.material:material:$mm_materialVersion"
api ("com.infobip:infobip-rtc:2.4.3") {
transitive = true
}
implementation "androidx.work:work-runtime-ktx:2.8.1"
testImplementation "junit:junit:4.13.2"
androidTestImplementation "androidx.test.ext:junit:1.1.3"
androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$mm_desugarJdkVersion"
}
android.libraryVariants.configureEach { variant ->
def name = variant.buildType.name
def jar = project.tasks.create(name: "jar${name.capitalize()}", type: Jar) {
Task javaCompileTask
if (variant.hasProperty('javaCompileProvider')) {
// Android 3.3.0+
javaCompileTask = variant.javaCompileProvider.get()
} else {
javaCompileTask = variant.javaCompile
}
dependsOn javaCompileTask
from javaCompileTask.destinationDirectory
manifest {
attributes(
"Bundle-Name": 'parse-android',
"Bundle-Version": project.version
)
}
exclude '**/R.class'
exclude '**/R\$*.class'
exclude '**/Manifest.class'
exclude '**/Manifest\$*.class'
exclude '**/BuildConfig.class'
}
artifacts {
archives jar
}
}
ext {
PUBLISH_ARTIFACT_ID = 'infobip-rtc-ui'
}
apply from: "${rootProject.projectDir}/publish-mavencentral.gradle"