Skip to content
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

Enable cache-redirector #453

Merged
merged 3 commits into from
Jul 30, 2024
Merged

Enable cache-redirector #453

merged 3 commits into from
Jul 30, 2024

Conversation

dkrasnoff
Copy link
Contributor

Cache-redirector works like CDN for JB builds.
The major part of the code was copy-stolen from kotlin repo's cache-redirector (it worth to add to a shared build-scripts for JB, when such repository will be exist).

In this PR I also removed duplicated properties for setting koltin version and custom repository URL according to our checklist #421

@dkrasnoff dkrasnoff requested a review from adam-enko July 16, 2024 09:56
@dkrasnoff dkrasnoff force-pushed the build-config/cache-redirector branch from 21d0232 to d8b9a77 Compare July 23, 2024 09:31
}
}

pluginManagement.repositories.redirect()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@adam-enko honestly say, I still don't understand, why do you suggest to move it to gradle dir. It looks like a real settings plugin, which should be applied directly to settings.gradle.kts.
I would suggest not to move it.

Copy link
Member

Choose a reason for hiding this comment

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

Well, because it's not a real settings plugin :) It's applied as a file-based script plugin in build-settings-logic/settings.gradle.kts and in all of the integration tests.

While technically it can be both a file-based and pre-compiled script plugin, it's a little odd. I also don't like that it's easy to accidentally break the the plugin by using a utility function from Utils.kt.

That said, if it works, it works. I'm not going to block the PR because of it.

.normalize()
.toFile()

val gradleDir = resolve("gradle").also { it.createDirectories() }
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
val gradleDir = resolve("gradle").also { it.createDirectories() }
val gradleDir = resolve("gradle").createDirectories()

nitpick: createDirectories() returns the same value, so also {} could be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved this change to #460

@dkrasnoff dkrasnoff force-pushed the build-config/cache-redirector branch from d8b9a77 to e0a3ee3 Compare July 29, 2024 18:27
@dkrasnoff dkrasnoff merged commit e80ff55 into develop Jul 30, 2024
2 checks passed
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