home-assistant-android/build.gradle.kts
2023-07-01 01:14:24 +00:00

54 lines
1.4 KiB
Plaintext

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.jlleitschuh.gradle.ktlint") version "11.4.2"
id("com.github.ben-manes.versions") version "0.47.0"
}
buildscript {
repositories {
google()
gradlePluginPortal()
}
dependencies {
classpath("com.android.tools.build:gradle:8.0.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22")
classpath("com.google.gms:google-services:4.3.15")
classpath("com.google.firebase:firebase-appdistribution-gradle:4.0.0")
classpath("de.mannodermaus.gradle.plugins:android-junit5:1.9.3.0")
classpath("com.github.triplet.gradle:play-publisher:3.8.4")
classpath("com.google.dagger:hilt-android-gradle-plugin:2.46.1")
}
}
allprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "11"
}
}
}
gradle.projectsEvaluated {
project(":app").tasks.matching { it.name.startsWith("publish") }.configureEach {
mustRunAfter(project(":wear").tasks.matching { it.name.startsWith("publish") })
}
}
tasks.register("clean").configure {
delete("build")
}
ktlint {
android.set(true)
}
tasks.register("versionFile").configure {
group = "publishing"
doLast {
File(projectDir, "version.txt").writeText(project.version.toString())
}
}