Skip to content

Commit

Permalink
chore(deps): update kotlin monorepo to v2 (major) (#630)
Browse files Browse the repository at this point in the history
chore(deps): update kotlin monorepo to v2

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
renovate[bot] authored May 23, 2024
1 parent 61e8d27 commit 8d591ed
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 6 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
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ allprojects {
kotlin {
jvmToolchain(libs.versions.java.compilation.get().toInteger())
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask).configureEach {
compilerOptions {
freeCompilerArgs.add("-Xlambdas=class")
}
}
}
pluginManager.withPlugin("java-gradle-plugin") {
configurations {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gradle-gradlepublish = "1.2.1"
gradle-jacocotestkit = "1.0.12"
gradle-detekt = "1.23.6"
gradle-doctor = "0.10.0"
mavencentral-kotlin = "1.9.24"
mavencentral-kotlin = "2.0.0"
mavencentral-issuechecker = "0.4.0"
mavencentral-junit = "5.10.2"
mavencentral-assertj = "3.25.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,13 @@ class KotlinLibraryPlugin : Plugin<Project> {
}
}
}

pluginManager.withPlugin("java-gradle-plugin") {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask::class.java).configureEach {
compilerOptions {
freeCompilerArgs.add("-Xlambdas=class")
}
}
}
}
}
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 8d591ed

Please sign in to comment.