blob: c1dc0cf6749bdbdc42087c7e5398a3534c2dff7c [file] [log] [blame]
/*
* Copyright 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.
*/
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("AndroidXPlugin")
id("kotlin")
id("application")
id("com.github.johnrengelman.shadow")
}
mainClassName = "androidx.compose.compiler.daemon.MainKt"
dependencies {
implementation(libs.kotlinCompiler)
implementation(libs.kotlinStdlib)
implementation(project(":compose:compiler:compiler-hosted"))
}
shadowJar {
// The jar file MUST begin with "kotlin-compiler".
// If this name is not present, the Kotlin compiler will try to find kotlinHome and might cause
// a version mismatch if the dist version does not match the one shipped here.
// When the artifact starts with "kotlin-compiler", the compiler will not do that search.
archiveBaseName = 'kotlin-compiler-daemon'
}
project.tasks.named("shadowJar").configure { shadowJar ->
shadowJar.outputs.doNotCacheIf("Restoring from cache often takes longer", { true })
}
androidx {
name = "Compose Compiler Daemon"
type = LibraryType.COMPILER_DAEMON
inceptionYear = "2021"
description = "Compiler Daemon that includes the Compose plugin"
}