-
Notifications
You must be signed in to change notification settings - Fork 75
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
Switch to Kotlin build scripts + version catalog #585
Conversation
b40f365
to
5c0e29a
Compare
5c0e29a
to
3a1e77b
Compare
b5dfb92
to
75fc00d
Compare
# We use "strictly" to enforce the version cannot be overriden by transitive dependencies. | ||
# We need to enforce that the versions we use are the same as AOSP to ensure compatibility. | ||
|
||
# Kotlin versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment for this got lost, https://android.googlesource.com/platform/external/kotlinc/+/refs/tags/android-14.0.0_r1/build.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added it back.
@@ -0,0 +1,5 @@ | |||
[versions] | |||
kotlin = "1.8.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably keep the comments for the various kotlin versions and why we are using this one, here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the AOSP link here. Any other comments you think would be good here let me know and will add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found the comments we had before helpful, explaining that we need to match kotlin versions of AOSP here and what Android version was using which Kotlin version, but I guess we can build this up again starting from 14.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work, thanks a lot Steve!
storage/lib/build.gradle.kts
Outdated
|
||
defaultConfig { | ||
minSdk = libs.versions.minSdk.get().toInt() | ||
targetSdk = libs.versions.targetSdk.get().toInt() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this is deprecated, probably because we don't need to set this for libraries.
There's some other deprecation warnings (e.g. lintOptions -> lint), maybe already address them in an extra commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed and fixed most others.
build.gradle.kts
Outdated
buildscript { | ||
repositories { | ||
google() | ||
jcenter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need jcenter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
build.gradle.kts
Outdated
} | ||
|
||
subprojects { | ||
if (path == ":app" || path == ":storage:lib") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we could enable this everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enabled for all except demo
, which has a few violations.
0ef70a1
to
7bd0852
Compare
75fc00d
to
93e58f7
Compare
7bd0852
to
551538f
Compare
e64b00d
to
ba50b88
Compare
@@ -0,0 +1,5 @@ | |||
[versions] | |||
kotlin = "1.8.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found the comments we had before helpful, explaining that we need to match kotlin versions of AOSP here and what Android version was using which Kotlin version, but I guess we can build this up again starting from 14.
ba50b88
to
b131aaf
Compare
No description provided.