bnorm / kotlin-power-assert

Kotlin compiler plugin to enable diagrammed function calls in the Kotlin programming language
Apache License 2.0
581 stars 15 forks source link

Gradle 8 #87

Closed TWiStErRob closed 1 year ago

TWiStErRob commented 1 year ago

and some minor fixes to have 0 warnings in build.

@bnorm I recommend to review commit by commit, it looks like a lot, but they're all tiny changes.

Note: Kotlin 1.7.0 KMP is not compatible with Gradle 8, so the sample project needs to stay on Gradle 7.x latest. Kotlin 1.8.0 should fix all the deprecated API usage, see https://github.com/bnorm/kotlin-power-assert/pull/87/commits/85c1b08e45342e30f06a14996a7ba51065efd771 for more.

bnorm commented 1 year ago

Thanks so much for this change!

TWiStErRob commented 1 year ago

No worries, please double-check your release artifacts when publishing. I tried to make it equivalent, but it was so old there was no way to check if it's correct :) Please let me know if you need help fixing something.

bnorm commented 1 year ago

FYI, this change did also change the plugin coordinates from gradle.plguin.com.bnorm.power:com.bnorm.power:kotlin-power-assert-gradle to com.bnorm.power:com.bnorm.power:kotlin-power-assert-gradle. Good change as that is the new standard, but just a note in case people use classpath dependencies to configure plugins. I've noted this in the release notes and will update the changelog as well.

TWiStErRob commented 1 year ago

That doesn't sound right, did you mean com.bnorm.power.kotlin-power-assert:com.bnorm.power.kotlin-power-assert.gradle.plugin:version? If anything, only the Gradle Marker should change, no other dependency coordinate should be different.

bnorm commented 1 year ago

You can check my math here:

TWiStErRob commented 1 year ago

Huh, interesting, so the marker exists for both at the same coordinate, but the "marked" artifact is different: https://plugins.gradle.org/m2/com/bnorm/power/kotlin-power-assert/com.bnorm.power.kotlin-power-assert.gradle.plugin/0.12.0/com.bnorm.power.kotlin-power-assert.gradle.plugin-0.12.0.pom https://plugins.gradle.org/m2/com/bnorm/power/kotlin-power-assert/com.bnorm.power.kotlin-power-assert.gradle.plugin/0.12.1/com.bnorm.power.kotlin-power-assert.gradle.plugin-0.12.1.pom

TWiStErRob commented 1 year ago

I hunted down why the change happened. Between the publishing plugin version 0.21.0 and 1.0.0-rc-1 they changed the automatic gradle.plugin. prefixing, no mention in Release Notes. I guess that's an internal change. The only mention I found was https://plugins.gradle.org/docs/publish-plugin-legacy#publication-failed