mirror of
https://github.com/android/ndk-samples
synced 2025-11-05 15:05:47 +08:00
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.
32 lines
704 B
Plaintext
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"
|
|
}
|
|
}
|
|
}
|