-
Notifications
You must be signed in to change notification settings - Fork 15
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
Redefines the Gradle build strategy #175
Conversation
Only js platform Platform is not necessary for single-platform Unifies gradlew commands Removes macosarm64 Improves build commands on pull_request
check the code formatting including a new step
28adab1
to
06d331a
Compare
40c2e20
to
1659cb9
Compare
1659cb9
to
4deb864
Compare
88d7d67
to
875a241
Compare
875a241
to
3458b92
Compare
4f9ce2c
to
037233a
Compare
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.
Is this still a WIP PR? It would be very beneficial to merge this asap 🙂
@juanpedromoreno do we still need this, what can we do to get it merged? |
I think @franciscodr and @nomisRev were testing a different approach. I don't want to make it conflict with theirs, but I agree with you; let's decide to speed up the builds and go for one. Happy to close this one if it doesn't make sense 👍 |
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.
Nice trick to handle for multi- and single-platform targets!
@franciscodr @nomisRev can this be merged? |
…ef into build-platform-matrix
@raulraja I changed that by doing this: Let me know if that makes sense to you 🙂 So far,
The main branch, in my local, takes more than 9 minutes
|
@Yawolf Shall we filter for those that are multi-platform somehow? |
Yes, that makes sense but I think that not all subprojects returned are actually multiplatform, that returned list needs to be partitioned somehow based on that. |
Right, Maybe something like this @Yawolf ? fun Project.isMultiplatformModule(): Boolean {
val kotlinPluginId = "org.jetbrains.kotlin.multiplatform"
return plugins.hasPlugin(kotlinPluginId)
}
val multiPlatformModules = project.subprojects.filter { it.isMultiplatformModule() } |
Yeah! Something like that! Thanks! 😄 |
@juanpedromoreno for some reason I don't understand, fun isMultiplatformModule(project: Project): Boolean {
val kotlinPluginId = "libs.plugins.kotlin.multiplatform"
return project.buildFile.readText().contains(kotlinPluginId)
} And that returns this:
Which is correct, if I'm not wrong. |
👍 Great, that list looks correct, yes. |
In my local, with these changes, it takes:
While the main branch takes:
In GitHub actions, this PR took 7m 36s to build, while PR #130 took 8m 59s. So there's a slight performance improvement in these changes. |
Sounds good, thanks @Yawolf |
This PR could be considered a WIP, even if it's finally merged. Further iterations and optimizations will be required.
Initially, the objective of this PR is to decrease the build time. For that reason:
jvm
,js
,linuxX64
,macosX64
,mingwX64
(notice I've removedmacosArm64
due to some incompatibilities).Result
Hopefully, the build times should be reduced by more than 10 minutes.