Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszkwiecinski committed May 21, 2024
1 parent 84e6367 commit 24bf514
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.gradle
.idea
.instant-execution-state
.kotlin

# Ignore Gradle build output directory
build
Expand Down
2 changes: 2 additions & 0 deletions versioning/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ dependencies {
implementation project(":config")

testImplementation project(":testing")

testRuntimeDependencies(libs.jetbrains.kotlin.jvm.implementation)
}

tasks.named("test") {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -38,7 +37,7 @@ class VersioningPlugin : Plugin<Project> {

private fun Project.setupAndroidVersioning(gitVersionProvider: Provider<GitVersion>) {
pluginManager.withPlugin("com.android.application") {
extensions.getByType<ApplicationExtension>().defaultConfig {
extensions.getByType<com.android.build.api.dsl.ApplicationExtension>().defaultConfig {
val gitVersion = gitVersionProvider.get()
val major = gitVersion.major
val minor = gitVersion.minor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
)
Expand Down

0 comments on commit 24bf514

Please sign in to comment.