blob: 4b3b63182c1c0cc4c767d611d13da994f0d59e3f [file] [log] [blame]
/*
* Copyright 2019 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.Publish
plugins {
id("AndroidXPlugin")
}
androidXMultiplatform {
desktop()
sourceSets {
commonTest {
dependencies {
implementation(libs.kotlinStdlibCommon)
implementation(kotlin("test-junit"))
implementation(project(":compose:runtime:runtime"))
}
}
jvmTest {
dependencies {
implementation(libs.junit)
implementation(libs.kotlinMetadataJvm)
compileOnly(libs.kotlinCompiler)
implementation(
project(":compose:compiler:compiler-hosted:integration-tests:protobuf-test-classes")
)
implementation(libs.kotlinStdlib)
implementation(libs.protobufLite)
implementation(libs.guavaAndroid)
implementation(project(":compose:compiler:compiler-hosted"))
implementation("androidx.compose.foundation:foundation:1.6.0")
implementation("androidx.compose.ui:ui:1.6.0")
implementation(project(":compose:runtime:runtime"))
implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm:0.3.4")
implementation("com.google.dagger:dagger:2.40.1")
runtimeOnly(
project(":compose:compiler:compiler-hosted:integration-tests:kotlin-compiler-repackaged")
)
}
}
desktopTest {
dependsOn(jvmTest)
}
}
}
tasks.withType(Test).configureEach { test ->
test.dependsOn(":compose:compiler:compiler:embeddedPlugin")
test.maxHeapSize("1024m")
test.jvmArgs += ["--add-opens=jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED"]
if (test.name == "test") {
// The compose compiler debugger runs on desktop in AndroidStudio, and so the debugger test is
// implemented as a desktop test to avoid the need to inject tools.jar (from desktop jvm) into
// android tests
test.dependsOn("desktopTest")
}
}
androidx {
name = "Compiler CLI Tests"
publish = Publish.NONE
inceptionYear = "2019"
description = "Contains test for the compose compiler plugin"
}