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

Migrate build logic to Kotlin DSL #298

Merged
merged 9 commits into from
Apr 9, 2024
Merged

Migrate build logic to Kotlin DSL #298

merged 9 commits into from
Apr 9, 2024

Conversation

3flex
Copy link
Contributor

@3flex 3flex commented Apr 5, 2024

Closes #186

The diff from GitHub makes it hard to review, but the commit history should be clear.

Signed-off-by: Matthew Haughton <3flex@users.noreply.github.com>
Signed-off-by: Matthew Haughton <3flex@users.noreply.github.com>
Signed-off-by: Matthew Haughton <3flex@users.noreply.github.com>
Signed-off-by: Matthew Haughton <3flex@users.noreply.github.com>
Signed-off-by: Matthew Haughton <3flex@users.noreply.github.com>
Signed-off-by: Matthew Haughton <3flex@users.noreply.github.com>
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

val isCI = System.getenv("GITHUB_ACTIONS") != null
Copy link

Choose a reason for hiding this comment

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

Suggested change
val isCI = System.getenv("GITHUB_ACTIONS") != null
val isCI = providers.environmentVariable("CI").isPresent

remote(develocity.buildCache) {
isEnabled = true
// Check access key presence to avoid build cache errors on PR builds when access key is not present
val accessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY")
Copy link

Choose a reason for hiding this comment

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

Suggested change
val accessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY")
val accessKey = providers.environmentVariable("GRADLE_ENTERPRISE_ACCESS_KEY").isPresent

}

githubRelease {
token(System.getenv("CCUD_GIT_TOKEN") ?: "")
Copy link

Choose a reason for hiding this comment

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

Suggested change
token(System.getenv("CCUD_GIT_TOKEN") ?: "")
token(providers.environmentVariable("CCUD_GIT_TOKEN").orNull.orEmpty())

@3flex
Copy link
Contributor Author

3flex commented Apr 5, 2024

Thanks for reviewing @Goooler, I've kept the scope to the minimum required to migrate to Kotlin DSL, but those would be good contributions for another PR.

Copy link
Member

@clayburn clayburn left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @3flex! I made one suggestion. If you take that and fix the merge conflict, we'd be happy to accept this.

settings.gradle.kts Outdated Show resolved Hide resolved
3flex and others added 3 commits April 9, 2024 09:09
Co-authored-by: Clay Johnson <cjohnson@gradle.com>
Signed-off-by: Matthew Haughton <3flex@users.noreply.github.com>
Signed-off-by: Matthew Haughton <3flex@users.noreply.github.com>
@3flex
Copy link
Contributor Author

3flex commented Apr 8, 2024

Fixed - I've also updated README in the last commit as there were a few references (and a link) to settings.gradle. Please check that before merging, thanks!

@clayburn clayburn merged commit a7d9fdc into gradle:main Apr 9, 2024
3 checks passed
@3flex 3flex deleted the 186-fix branch April 9, 2024 01:02
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.

Migrate build logic to Kotlin DSL
3 participants