| /* |
| * Copyright (C) 2021 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. |
| */ |
| |
| /** |
| * This file was created using the `create_project.py` script located in the |
| * `<AndroidX root>/development/project-creator` directory. |
| * |
| * Please use that script when creating a new project, rather than copying an existing project and |
| * modifying its settings. |
| */ |
| import androidx.build.LibraryType |
| import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| |
| plugins { |
| id("AndroidXPlugin") |
| id("AndroidXComposePlugin") |
| id("com.android.library") |
| id("kotlin-android") |
| id("androidx.inspection") |
| } |
| |
| dependencies { |
| implementation("androidx.annotation:annotation:1.8.1", { |
| exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib" |
| }) |
| // Following dependencies will be provided by inspected app itself |
| // because compose:ui-inspector can be run only in app with compose:ui:ui |
| // thus all its transitive dependencies will be present too. |
| compileOnly(libs.kotlinStdlib) |
| compileOnly("androidx.collection:collection:1.4.2") |
| compileOnly("androidx.inspection:inspection:1.0.0") |
| compileOnly("androidx.compose.runtime:runtime:1.2.1") |
| compileOnly(project(":compose:ui:ui-graphics")) |
| compileOnly(project(":compose:ui:ui")) |
| // we ignore its transitive dependencies, because ui-inspection should |
| // depend on them as "compile-only" deps. |
| implementation(project(":compose:ui:ui-tooling-data"), { |
| transitive = false |
| }) |
| implementation(libs.kotlinReflect, { |
| exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib" |
| }) |
| androidTestImplementation(libs.kotlinStdlib) |
| androidTestImplementation(libs.kotlinCoroutinesAndroid) |
| androidTestImplementation(libs.testCore) |
| androidTestImplementation(project(":compose:foundation:foundation-layout")) |
| androidTestImplementation(project(":compose:ui:ui-tooling")) |
| androidTestImplementation(project(":compose:ui:ui-tooling-data")) |
| androidTestImplementation(project(":compose:ui:ui")) |
| androidTestImplementation(project(":compose:foundation:foundation")) |
| androidTestImplementation(project(":compose:ui:ui-util")) |
| androidTestImplementation(project(":compose:ui:ui-test-junit4")) |
| androidTestImplementation(project(":internal-testutils-fonts")) |
| androidTestImplementation(project(":compose:material:material")) |
| androidTestImplementation("androidx.compose.material:material-icons-core:1.6.7") |
| androidTestImplementation(project(":inspection:inspection-testing")) |
| androidTestImplementation("androidx.activity:activity-compose:1.3.1") |
| androidTestImplementation(libs.testRunner) |
| androidTestImplementation(libs.testRules) |
| androidTestImplementation(libs.testExtJunit) |
| androidTestImplementation(libs.truth) |
| } |
| |
| androidx { |
| name = "Compose Layout Inspector" |
| type = LibraryType.IDE_PLUGIN |
| inceptionYear = "2021" |
| description = "Compose layout inspector. Exposes information to our tools for better IDE support." |
| } |
| |
| android { |
| compileSdk = 35 |
| defaultConfig { |
| // layout inspection supported starting on Android Q |
| minSdk = 29 |
| } |
| |
| sourceSets { |
| main.resources.srcDirs += "src/main/proto" |
| } |
| |
| externalNativeBuild { |
| cmake { |
| path "src/main/cpp/CMakeLists.txt" |
| version = libs.versions.cmake.get() |
| } |
| } |
| namespace = "androidx.compose.ui.inspection" |
| } |
| |
| inspection { |
| name = "compose-ui-inspection.jar" |
| } |