Skip to content

Commit

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

* fix build bug

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ahoo Wang <ahoowang@qq.com>
  • Loading branch information
renovate[bot] and Ahoo-Wang authored May 22, 2024
1 parent 6b7ecad commit 49baf35
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 13 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.testretry.TestRetryPlugin
import org.jetbrains.dokka.gradle.DokkaPlugin
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.util.archivesName

plugins {
alias(libs.plugins.testRetry)
Expand Down Expand Up @@ -58,7 +57,7 @@ allprojects {
}
apply<BasePlugin>()
base {
archivesName.set("${rootProject.name.lowercase()}-${project.name}")
archivesName.set(project.getArchivesName())
}
}

Expand Down Expand Up @@ -88,7 +87,7 @@ configure(libraryProjects) {
jvmToolchain(17)
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
compilerOptions {
freeCompilerArgs = listOf("-Xjsr305=strict", "-Xjvm-default=all-compatibility")
}
}
Expand Down Expand Up @@ -146,12 +145,20 @@ configure(publishProjects) {
password = System.getenv("GITHUB_TOKEN")
}
}
maven {
name = "LinYiPackages"
url = uri(project.properties["linyiPackageReleaseUrl"].toString())
credentials {
username = project.properties["linyiPackageUsername"]?.toString()
password = project.properties["linyiPackagePwd"]?.toString()
}
}
}
publications {
val publishName = if (isBom) "mavenBom" else "mavenLibrary"
val publishComponentName = if (isBom) "javaPlatform" else "java"
create<MavenPublication>(publishName) {
artifactId = project.archivesName.get()
artifactId = project.getArchivesName()
from(components[publishComponentName])
pom {
name.set(artifactId)
Expand Down Expand Up @@ -211,3 +218,5 @@ nexusPublishing {
}

fun getPropertyOf(name: String) = project.properties[name]?.toString()

fun Project.getArchivesName() = "${rootProject.name.lowercase()}-${project.name}"
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ javaJwt = "4.4.0"
testRetry = "1.5.9"
detekt = "1.23.6"
dokka = "1.9.20"
kotlin = "1.9.24"
kotlin = "2.0.0"
publishPlugin = "2.0.0"

[libraries]
Expand Down

0 comments on commit 49baf35

Please sign in to comment.