Skip to content

Upgrade Kotlin & related libraries to 2.1.0#267

Merged
jbarr21 merged 11 commits intomainfrom
jb/2.1.0
Feb 14, 2025
Merged

Upgrade Kotlin & related libraries to 2.1.0#267
jbarr21 merged 11 commits intomainfrom
jb/2.1.0

Conversation

@jbarr21
Copy link
Contributor

@jbarr21 jbarr21 commented Feb 12, 2025

Upgrade Kotlin libraries in Motif to support v2.1.0. Upgrading Kotlin required updating many transitive libraries. KtFmt was also applied to the whole repo.

Updated libraries:

  • Kotlin
  • KSP
  • XProcessing
  • AGP
  • Gradle
  • Dokka
  • Spotless
  • KtLint
  • KtFmt
  • GJF

@jbarr21 jbarr21 force-pushed the jb/2.1.0 branch 2 times, most recently from e0ad7e6 to b38a02e Compare February 12, 2025 21:43
if (isKotlinLibrary && isAndroidLibraryOrApp) {
android {
kotlinOptions {
jvmTarget = "1.8"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need to target 1.8?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could prolly target 11 since it's tooling, but trying to limit the scope of this already large change

.build()
}

@OptIn(com.squareup.kotlinpoet.javapoet.KotlinPoetJavaPoetPreview::class)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: import

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea where that file came from? I assume we need it cleaned up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will remove

Copy link

@psteiger psteiger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved w/ some suggestions / questions

compileSdkVersion: 33,
ci: 'true' == System.getenv('CI'),
minSdkVersion: 21,
targetSdkVersion: 30,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we're limiting scope of changes but should we follow up with a bump in target as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it only affects samples & it had further changes that i didn't want to tackle

ktlint: '0.41.0',
ktfmt: '0.23',
kotlin: '2.1.0',
ksp: '2.1.0-1.0.28',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we go 2.1.0-1.0.29? It just got out 2wks ago

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

upstream bazel rules_kotlin are on 2.1.0-1.0.28, so i stick w/ that for now

room: '2.1.0',
roomCompilerProcessing: '2.6.0-alpha02',
dokka: '1.9.10',
roomCompilerProcessing: '2.7.0-alpha13',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we bump to a non-alpha?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sadly no, this is most recent. it has the necessary set of deps to support the version of kotlin/ksp/jvmMetadata that we want

@jbarr21 jbarr21 merged commit 6f47cbf into main Feb 14, 2025
5 checks passed
@jbarr21 jbarr21 deleted the jb/2.1.0 branch February 14, 2025 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants