1/*
2 * Copyright 2021 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17plugins {
18    id("AndroidXPlugin")
19    id("com.android.library")
20    id("org.jetbrains.kotlin.android")
21}
22
23android {
24    compileSdk = 35
25    flavorDimensions = ["targetSdk"]
26    productFlavors {
27        targetSdk29 {
28            dimension "targetSdk"
29        }
30        targetSdk30 {
31            dimension "targetSdk"
32        }
33        targetSdkLatest {
34            dimension "targetSdk"
35            // Default is set to latest
36        }
37    }
38    namespace = "androidx.viewpager2.integration.targestsdktests"
39}
40
41androidComponents {
42    beforeVariants(selector().withFlavor("targetSdk", "targetSdk29")) { variant ->
43        variant.androidTest.targetSdk = 29
44    }
45    beforeVariants(selector().withFlavor("targetSdk", "targetSdk30")) { variant ->
46        variant.androidTest.targetSdk = 30
47    }
48}
49
50dependencies {
51    androidTestImplementation(project(":viewpager2:viewpager2"))
52    androidTestImplementation("androidx.activity:activity-ktx:1.3.1")
53    androidTestImplementation("androidx.fragment:fragment-ktx:1.3.6")
54    androidTestImplementation(libs.testRunner)
55    androidTestImplementation(libs.testMonitor)
56    androidTestImplementation(libs.testExtJunit)
57}
58