-
Notifications
You must be signed in to change notification settings - Fork 3
Kotlin version catalog and Kotlin DSL #138
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
Conversation
…og-and-kotlin-dsl
I've tested this in WPAndroid and it kind of works, but there is a regression. Notice how the dependency was added:
Using the current
I don't quite understand the reason behind this. I compared the
However, there is a change at the very end of the pom:
I guess that might be the reason behind it, but For anyone who might be unfamiliar with This is not a blocker for us, so I am going to proceed with merging the PR and address the issue as a follow up. If we can't address it in the next couple days, I'll open an issue to track it. |
This PR updates the Kotlin & Android projects to use Kotlin DSL for build scripts and version catalog to keep its dependencies and versions.
I wanted to do use this modern setup from the very start, but during the prototype, it was slowing me down as I was more familiar with Groovy build scripts. With version catalog, I don't even have a justification, I don't know why I didn't use it 🤦♂️
Hopefully this is a one to one change from Groovy build script to Kotlin DSL. I had to make some minor changes to get things working, such as removing
common.gradle
and combining it to:api:android
, which probably is a good thing, because that logic is unlikely to be used elsewhere.Looking at the PR now, I can see that there is a lot of room for improvement for the Kotlin DSL, and I think I have a couple unused versions in the version catalog, but polishing all that has a very low priority for me at the moment.
The main reason I am doing this at the moment is because I'd like to add a multiplatform example app to the project and the Kotlin Multiplatform Wizard uses Kotlin DSL and version catalog. Either I have to convert everything from that generated project to Groovy script and regular versions, or I have to update the current implementation. I guess we could also use a mixed approach, but that's even more of a headache. So, I bit the bullet and updated the current build scripts.
To Test
make test-server && make dump-mysql && make backup-wp-content-plugins
cd native/kotlin && ./gradlew :api:kotlin:integrationTest cAT