| /* |
| * Copyright 2020 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| import androidx.build.Publish |
| import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| |
| plugins { |
| id("AndroidXPlugin") |
| id("com.android.library") |
| id("kotlin-android") |
| } |
| |
| android { |
| defaultConfig { |
| multiDexEnabled = true |
| } |
| buildTypes.all { |
| consumerProguardFiles "proguard-rules.pro" |
| } |
| sourceSets { |
| String testUtilDir = 'src/testUtil/java' |
| test { |
| java.srcDir testUtilDir |
| } |
| androidTest { |
| java.srcDir testUtilDir |
| } |
| } |
| namespace "androidx.window" |
| } |
| |
| dependencies { |
| api(libs.kotlinStdlib) |
| api(libs.kotlinCoroutinesAndroid) |
| implementation("androidx.annotation:annotation:1.2.0") |
| implementation("androidx.collection:collection:1.1.0") |
| implementation("androidx.core:core:1.3.2") |
| |
| compileOnly(project(":window:sidecar:sidecar")) |
| compileOnly(project(":window:extensions:extensions")) |
| |
| testImplementation(libs.testCore) |
| testImplementation(libs.testRunner) |
| testImplementation(libs.junit) |
| testImplementation(libs.truth) |
| testImplementation(libs.robolectric) |
| testImplementation(libs.mockitoCore) |
| testImplementation(libs.mockitoKotlin) |
| testImplementation(libs.kotlinCoroutinesTest) |
| testImplementation(compileOnly(project(":window:sidecar:sidecar"))) |
| testImplementation(compileOnly(project(":window:extensions:extensions"))) |
| |
| androidTestImplementation(libs.testCore) |
| androidTestImplementation(libs.kotlinTestJunit) |
| androidTestImplementation(libs.testExtJunit) |
| androidTestImplementation(libs.testRunner) |
| androidTestImplementation(libs.testRules) |
| androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) |
| androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) |
| androidTestImplementation(libs.mockitoKotlin, excludes.bytebuddy) |
| androidTestImplementation(libs.kotlinCoroutinesTest) |
| androidTestImplementation(libs.multidex) |
| androidTestImplementation(libs.truth) |
| androidTestImplementation(libs.junit) // Needed for Assert.assertThrows |
| androidTestImplementation(compileOnly(project(":window:extensions:extensions"))) |
| androidTestImplementation(compileOnly(project(":window:sidecar:sidecar"))) |
| samples(project(":window:window-samples")) |
| } |
| |
| androidx { |
| name = "Jetpack WindowManager Library" |
| publish = Publish.SNAPSHOT_AND_RELEASE |
| mavenGroup = LibraryGroups.WINDOW |
| inceptionYear = "2020" |
| description = "WindowManager Jetpack library. Currently only provides additional " + |
| "functionality on foldable devices." |
| // Suppressing deprecation warnings, since there is a need to maintain compatibility with old |
| // Sidecar interface. |
| failOnDeprecationWarnings = false |
| } |
| |
| // Allow usage of Kotlin's @OptIn. |
| tasks.withType(KotlinCompile).configureEach { |
| kotlinOptions { |
| freeCompilerArgs += ["-opt-in=kotlin.RequiresOptIn"] |
| } |
| } |