Files
ndk-samples/build-logic/build.gradle.kts
Dan Albert 2fadc89708 Add a (currently trivial) convention plugin.
Apparently gradle's new version catalogs only work in certain contexts,
so we still need a convention plugin to be able to centralize decisions
like compileSdk and targetSdk. I'm starting with those for now to prove
it out, then will expand it to cover other interesting things like NDK
version.
2024-05-09 14:04:36 -07:00

32 lines
704 B
Plaintext

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("java-gradle-plugin")
`kotlin-dsl`
alias(libs.plugins.jetbrains.kotlin.jvm)
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
}
dependencies {
compileOnly(libs.android.gradlePlugin)
}
gradlePlugin {
plugins {
register("androidApplication") {
id = "ndksamples.android.application"
implementationClass = "com.android.ndk.samples.buildlogic.AndroidApplicationConventionPlugin"
}
}
}