xref: /aosp_15_r20/external/lottie/lottie-compose/build.gradle (revision bb5273fecd5c61b9ace70f9ff4fcd88f0e12e3f7)
1*bb5273feSAndroid Build Coastguard Workerimport com.vanniktech.maven.publish.SonatypeHost
2*bb5273feSAndroid Build Coastguard Workerimport static de.fayard.refreshVersions.core.Versions.versionFor
3*bb5273feSAndroid Build Coastguard Worker
4*bb5273feSAndroid Build Coastguard Workerplugins {
5*bb5273feSAndroid Build Coastguard Worker  id 'com.android.library'
6*bb5273feSAndroid Build Coastguard Worker  id 'org.jetbrains.kotlin.android'
7*bb5273feSAndroid Build Coastguard Worker  id 'com.vanniktech.maven.publish'
8*bb5273feSAndroid Build Coastguard Worker  id 'androidx.baselineprofile'
9*bb5273feSAndroid Build Coastguard Worker  id 'org.jetbrains.kotlinx.binary-compatibility-validator'
10*bb5273feSAndroid Build Coastguard Worker}
11*bb5273feSAndroid Build Coastguard Worker
12*bb5273feSAndroid Build Coastguard Workerandroid {
13*bb5273feSAndroid Build Coastguard Worker  namespace 'com.airbnb.lottie.compose'
14*bb5273feSAndroid Build Coastguard Worker  compileSdk 34
15*bb5273feSAndroid Build Coastguard Worker  defaultConfig {
16*bb5273feSAndroid Build Coastguard Worker    minSdk 21
17*bb5273feSAndroid Build Coastguard Worker    targetSdk 34
18*bb5273feSAndroid Build Coastguard Worker    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
19*bb5273feSAndroid Build Coastguard Worker  }
20*bb5273feSAndroid Build Coastguard Worker  buildTypes {
21*bb5273feSAndroid Build Coastguard Worker    release {
22*bb5273feSAndroid Build Coastguard Worker      minifyEnabled false
23*bb5273feSAndroid Build Coastguard Worker    }
24*bb5273feSAndroid Build Coastguard Worker  }
25*bb5273feSAndroid Build Coastguard Worker  kotlinOptions {
26*bb5273feSAndroid Build Coastguard Worker    freeCompilerArgs += [
27*bb5273feSAndroid Build Coastguard Worker        "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
28*bb5273feSAndroid Build Coastguard Worker    ]
29*bb5273feSAndroid Build Coastguard Worker  }
30*bb5273feSAndroid Build Coastguard Worker  buildFeatures {
31*bb5273feSAndroid Build Coastguard Worker    compose true
32*bb5273feSAndroid Build Coastguard Worker  }
33*bb5273feSAndroid Build Coastguard Worker  composeOptions {
34*bb5273feSAndroid Build Coastguard Worker    kotlinCompilerExtensionVersion = versionFor(project, AndroidX.compose.compiler)
35*bb5273feSAndroid Build Coastguard Worker  }
36*bb5273feSAndroid Build Coastguard Worker}
37*bb5273feSAndroid Build Coastguard Worker
38*bb5273feSAndroid Build Coastguard WorkermavenPublishing {
39*bb5273feSAndroid Build Coastguard Worker  publishToMavenCentral(SonatypeHost.DEFAULT)
40*bb5273feSAndroid Build Coastguard Worker  signAllPublications()
41*bb5273feSAndroid Build Coastguard Worker}
42*bb5273feSAndroid Build Coastguard Worker
43*bb5273feSAndroid Build Coastguard WorkerbaselineProfile {
44*bb5273feSAndroid Build Coastguard Worker  filter {
45*bb5273feSAndroid Build Coastguard Worker    include 'com.airbnb.lottie.compose.**'
46*bb5273feSAndroid Build Coastguard Worker  }
47*bb5273feSAndroid Build Coastguard Worker}
48*bb5273feSAndroid Build Coastguard Worker
49*bb5273feSAndroid Build Coastguard Workerdependencies {
50*bb5273feSAndroid Build Coastguard Worker  api project(':lottie')
51*bb5273feSAndroid Build Coastguard Worker  implementation platform(libs.compose.bom)
52*bb5273feSAndroid Build Coastguard Worker  implementation libs.compose.foundation
53*bb5273feSAndroid Build Coastguard Worker  implementation libs.compose.ui
54*bb5273feSAndroid Build Coastguard Worker
55*bb5273feSAndroid Build Coastguard Worker  baselineProfile project(':baselineprofile')
56*bb5273feSAndroid Build Coastguard Worker
57*bb5273feSAndroid Build Coastguard Worker  testImplementation libs.robolectric
58*bb5273feSAndroid Build Coastguard Worker  testImplementation libs.androidx.collection.ktx
59*bb5273feSAndroid Build Coastguard Worker  testImplementation libs.kotlinx.coroutines.test
60*bb5273feSAndroid Build Coastguard Worker  testImplementation libs.junit4
61*bb5273feSAndroid Build Coastguard Worker  androidTestImplementation libs.androidx.test.junit
62*bb5273feSAndroid Build Coastguard Worker  androidTestImplementation libs.androidx.test.espresso
63*bb5273feSAndroid Build Coastguard Worker}
64