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

Use modern API to get environment variables #299

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Expand Up @@ -91,7 +91,7 @@ signing {
}

githubRelease {
token(System.getenv("CCUD_GIT_TOKEN") ?: "")
token(providers.environmentVariable("CCUD_GIT_TOKEN"))
owner = "gradle"
repo = "common-custom-user-data-gradle-plugin"
targetCommitish = "main"
Expand Down
6 changes: 3 additions & 3 deletions settings.gradle.kts
Expand Up @@ -4,7 +4,7 @@ plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

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

develocity {
server = "https://ge.solutions-team.gradle.com"
Expand All @@ -25,8 +25,8 @@ buildCache {
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")
isPush = isCI && accessKey != null
val accessKey = providers.environmentVariable("GRADLE_ENTERPRISE_ACCESS_KEY").isPresent
isPush = isCI && accessKey
}
}

Expand Down