diff --git a/.gitignore b/.gitignore index 8609445b..a7dba7f0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .gradle .idea .instant-execution-state +.kotlin # Ignore Gradle build output directory build diff --git a/versioning/build.gradle b/versioning/build.gradle index a8f22aee..d99bb5cc 100644 --- a/versioning/build.gradle +++ b/versioning/build.gradle @@ -12,6 +12,8 @@ dependencies { implementation project(":config") testImplementation project(":testing") + + testRuntimeDependencies(libs.jetbrains.kotlin.jvm.implementation) } tasks.named("test") { diff --git a/versioning/src/main/kotlin/com/project/starter/versioning/plugins/VersioningPlugin.kt b/versioning/src/main/kotlin/com/project/starter/versioning/plugins/VersioningPlugin.kt index aea325b7..0c6e68cf 100644 --- a/versioning/src/main/kotlin/com/project/starter/versioning/plugins/VersioningPlugin.kt +++ b/versioning/src/main/kotlin/com/project/starter/versioning/plugins/VersioningPlugin.kt @@ -1,6 +1,5 @@ package com.project.starter.versioning.plugins -import com.android.build.api.dsl.ApplicationExtension import com.project.starter.config.getByType import org.gradle.api.DefaultTask import org.gradle.api.GradleException @@ -38,7 +37,7 @@ class VersioningPlugin : Plugin { private fun Project.setupAndroidVersioning(gitVersionProvider: Provider) { pluginManager.withPlugin("com.android.application") { - extensions.getByType().defaultConfig { + extensions.getByType().defaultConfig { val gitVersion = gitVersionProvider.get() val major = gitVersion.major val minor = gitVersion.minor diff --git a/versioning/src/test/kotlin/com/project/starter/versioning/VersioningPluginTest.kt b/versioning/src/test/kotlin/com/project/starter/versioning/VersioningPluginTest.kt index 119bc286..f06fe470 100644 --- a/versioning/src/test/kotlin/com/project/starter/versioning/VersioningPluginTest.kt +++ b/versioning/src/test/kotlin/com/project/starter/versioning/VersioningPluginTest.kt @@ -36,18 +36,18 @@ internal class VersioningPluginTest : WithGradleProjectTest() { writeText( """ plugins { - id 'org.jetbrains.kotlin.jvm' version "1.9.21" + id 'org.jetbrains.kotlin.jvm' } """.trimIndent(), ) } } - module2Root = resolve("module1") { + module2Root = resolve("module2") { resolve("build.gradle") { writeText( """ plugins { - id 'org.jetbrains.kotlin.jvm' version "1.9.21" + id 'org.jetbrains.kotlin.jvm' } """.trimIndent(), )