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

Configure JetBrains Gradle Enterprise & Build Cache #3446

Merged
merged 15 commits into from
Jan 22, 2024

Conversation

adam-enko
Copy link
Member

@adam-enko adam-enko commented Jan 12, 2024

Use JetBrains Gradle Enterprise for builds.

This should improve the build speeds both for local development and on CI.

Summary

TODO

  • Update the readme/contributing guide? What properties are necessary? I added some brief docs. Build Scans aren't as important so I've opted out by default.
  • update TeamCity config to add necessary properties. Dokka has a Build Cache account. I've added the user/pass to TeamCity
  • update GitHub Actions config to add environment variable ORG_GRADLE_PROJECT_org.jetbrains.dokka.build.scan.url=https://ge.jetbrains.com/ @IgnatBeresnev are you able to do this? I don't have access to the config.

@adam-enko adam-enko force-pushed the feat/KT-64916-jb-gradle-enterprise branch from 7dbef4e to a6f8a13 Compare January 15, 2024 13:05
@adam-enko adam-enko force-pushed the feat/KT-64916-jb-gradle-enterprise branch from f92ca6a to 14d5a00 Compare January 15, 2024 15:22
@adam-enko adam-enko marked this pull request as ready for review January 17, 2024 17:08
@whyoleg
Copy link
Collaborator

whyoleg commented Jan 18, 2024

update GitHub Actions config to add environment variable ORG_GRADLE_PROJECT_org.jetbrains.dokka.build.scan.url=https://ge.jetbrains.com/ @whyoleg are you able to do this?

Nope. @IgnatBeresnev this if for you I believe.

Also, just a question, how will it affect local development or only CI? AFAIU local build cache will work as before, remote build cache will not be available by default (and will be used only on CI)?

Copy link
Collaborator

@whyoleg whyoleg left a comment

Choose a reason for hiding this comment

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

LGTM

build-settings-logic/settings.gradle.kts Show resolved Hide resolved
CONTRIBUTING.md Show resolved Hide resolved
@adam-enko adam-enko force-pushed the feat/KT-64916-jb-gradle-enterprise branch from 52793f9 to e2ae243 Compare January 19, 2024 09:30
@adam-enko
Copy link
Member Author

Also, just a question, how will it affect local development or only CI? AFAIU local build cache will work as before, remote build cache will not be available by default (and will be used only on CI)?

Remote Build Cache will always be enabled, but in read-only mode. TeamCity has the Build Cache credentials, and so 'push' is enabled. For local development this will help by being able to re-use the build results from CI.

(Build Scan is opt-in, and is disabled by default.)

@whyoleg
Copy link
Collaborator

whyoleg commented Jan 19, 2024

Remote Build Cache will always be enabled, but in read-only mode.

But build.cache.url has no default, so no remote build cache will be enabled by default. So this means, that we will need additional configuration locally, right?

@adam-enko
Copy link
Member Author

Remote Build Cache will always be enabled, but in read-only mode.

But build.cache.url has no default, so no remote build cache will be enabled by default. So this means, that we will need additional configuration locally, right?

org.jetbrains.dokka.build.cache.url is set in the project root gradle.properties https://github.com/Kotlin/dokka/pull/3446/files#diff-3d103fc7c312a3e136f88e81cef592424b8af2464c468116545c4d22d6edcf19

@whyoleg
Copy link
Collaborator

whyoleg commented Jan 19, 2024

org.jetbrains.dokka.build.cache.url is set in the project root gradle.properties

🤦, somehow missed it, sorry...
No more questions, good to go from my side

@adam-enko
Copy link
Member Author

🤦, somehow missed it, sorry... No more questions, good to go from my side

No problem, thanks!

CONTRIBUTING.md Outdated Show resolved Hide resolved
@adam-enko adam-enko merged commit ba5dd18 into master Jan 22, 2024
11 of 13 checks passed
@adam-enko adam-enko deleted the feat/KT-64916-jb-gradle-enterprise branch January 22, 2024 11:16
@adam-enko adam-enko self-assigned this Jan 22, 2024
@adam-enko adam-enko added the infrastructure Everything related to builds tools, CI configurations and project tooling label Jan 22, 2024
vmishenev pushed a commit that referenced this pull request Mar 20, 2024
* [Gradle] configure JetBrains Gradle Enterprise & Build Cache

^KT-64916 Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Everything related to builds tools, CI configurations and project tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants