Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect the Kotlin version at runtime rather than hard-coding it. #64

Merged
merged 3 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## [Unreleased]
### Changed
- Bump all dependencies to latest.
- Bump required JVM from 11 to 17. ([#63](https://github.com/diffplug/atplug/pull/63))
- Detect Kotlin version rather than harcode it. ([#64](https://github.com/diffplug/atplug/pull/64))

## [1.1.1] - 2024-07-06
### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ class PlugPlugin : Plugin<Project> {
project.plugins.apply(JavaPlugin::class.java)
val javaExtension = project.extensions.getByType(JavaPluginExtension::class.java)
val main = javaExtension.sourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME)
val dep = project.dependencies.create("org.jetbrains.kotlin:kotlin-reflect:1.8.20")
val plugin =
project.plugins.findPlugin("org.jetbrains.kotlin.jvm")
as org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper
val dep =
project.dependencies.create("org.jetbrains.kotlin:kotlin-reflect:${plugin.pluginVersion}")
val plugGenConfig =
project.configurations.create("plugGenerate") { plugGen: Configuration ->
plugGen.extendsFrom(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class PlugGeneratorTest : ResourceHarness() {
true,
listOf(
"org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1",
"org.jetbrains.kotlin:kotlin-reflect:1.8.20"))
"org.jetbrains.kotlin:kotlin-reflect:2.1.0"))
val atplug_runtime = mutableSetOf(findRuntimeJar())
atplug_runtime.addAll(transitives)
return atplug_runtime
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ subprojects {
dependencies {
implementation "org.ow2.asm:asm:9.7.1"
implementation 'com.diffplug.gradle:goomph:4.2.0'
implementation 'org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0'
testImplementation 'org.assertj:assertj-core:3.27.3'
}
tasks.named('test') {
Expand Down
Loading