@@ -6,8 +6,6 @@ import org.gradle.api.plugins.JavaPlugin.RUNTIME_ELEMENTS_CONFIGURATION_NAME
66import org.gradle.api.plugins.JavaPlugin.SOURCES_ELEMENTS_CONFIGURATION_NAME
77import org.gradle.plugin.compatibility.compatibility
88import org.jetbrains.kotlin.gradle.dsl.JvmDefaultMode
9- import org.jetbrains.kotlin.gradle.dsl.JvmTarget
10- import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
119import org.jetbrains.kotlin.gradle.dsl.abi.ExperimentalAbiValidation
1210
1311plugins {
@@ -17,6 +15,7 @@ plugins {
1715 alias(libs.plugins.mavenPublish)
1816 alias(libs.plugins.pluginPublish)
1917 alias(libs.plugins.spotless)
18+ alias(libs.plugins.tapmoc)
2019}
2120
2221version = providers.gradleProperty(" VERSION_NAME" ).get()
@@ -30,18 +29,9 @@ dokka { dokkaPublications.html { outputDirectory = rootDir.resolve("docs/api") }
3029kotlin {
3130 explicitApi()
3231 @OptIn(ExperimentalAbiValidation ::class ) abiValidation { enabled = true }
33- val jdkRelease = " 17"
3432 compilerOptions {
3533 allWarningsAsErrors = true
36- // https://docs.gradle.org/current/userguide/compatibility.html#kotlin
37- apiVersion = KotlinVersion .KOTLIN_2_2
38- languageVersion = apiVersion
39- jvmTarget = JvmTarget .fromTarget(jdkRelease)
4034 jvmDefault = JvmDefaultMode .NO_COMPATIBILITY
41- freeCompilerArgs.add(" -Xjdk-release=$jdkRelease " )
42- }
43- target.compilations.configureEach {
44- compileJavaTaskProvider { options.release = jdkRelease.toInt() }
4535 }
4636}
4737
@@ -60,6 +50,13 @@ spotless {
6050 kotlinGradle { ktfmt(libs.ktfmt.get().version).googleStyle() }
6151}
6252
53+ tapmoc {
54+ gradle(" 9.0.0" )
55+ java(17 )
56+ // https://docs.gradle.org/current/userguide/compatibility.html#kotlin
57+ kotlin(" 2.2.0" )
58+ }
59+
6360val testPluginClasspath by
6461 configurations.registering {
6562 isCanBeResolved = true
@@ -97,14 +94,6 @@ publishing.publications.withType<MavenPublication>().configureEach {
9794 suppressPomMetadataWarningsFor(SOURCES_ELEMENTS_CONFIGURATION_NAME )
9895}
9996
100- configurations.named(API_ELEMENTS_CONFIGURATION_NAME ) {
101- attributes.attribute(
102- // TODO: https://github.com/gradle/gradle/issues/24608
103- GradlePluginApiVersion .GRADLE_PLUGIN_API_VERSION_ATTRIBUTE ,
104- objects.named(libs.versions.minGradle.get()),
105- )
106- }
107-
10897val testGradleVersion: String =
10998 providers.gradleProperty(" testGradleVersion" ).orNull.let {
11099 val value = if (it == null || it == " current" ) GradleVersion .current().version else it
0 commit comments