8000 Use Access Key based authentication via Develocity Connector by runningcode · Pull Request #673 · androidx/androidx · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use Access Key based authentication via Develocity Connector #673

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

Open
wants to merge 1 commit into
base: androidx-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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/actions/build-single-project/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ runs:
- name: "gradle buildOnServer zipTestConfigsWithApks"
env:
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
GRADLE_BUILD_CACHE_PASSWORD: ${{ inputs.gradle-cache-password }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ inputs.gradle-enterprise-access-key }}
GRADLE_ENCRYPTION_KEY: ${{ inputs.gradle-encryption-key }}
working-directory: ${{ inputs.project-root }}
Expand All @@ -70,7 +69,6 @@ runs:
- name: "gradle playgroundCIHostTests"
env:
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
GRADLE_BUILD_CACHE_PASSWORD: ${{ inputs.gradle-cache-password }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ inputs.gradle-enterprise-access-key }}
GRADLE_ENCRYPTION_KEY: ${{ inputs.gradle-encryption-key }}
working-directory: ${{ inputs.project-root }}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
status: ${{ steps.output-status.outputs.status }}
affectedFileArgs: ${{ steps.affected-file-args.outputs.files }}
env:
GRADLE_BUILD_CACHE_PASSWORD: ${{ secrets.GRADLE_BUILD_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
steps:
Expand Down Expand Up @@ -130,7 +129,6 @@ jobs:
env:
artifact-id: ${{matrix.project}}
project-root: playground-projects/${{matrix.project-root || matrix.project}}-playground
GRADLE_BUILD_CACHE_PASSWORD: ${{ secrets.GRADLE_BUILD_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
steps:
Expand All @@ -150,7 +148,6 @@ jobs:
with:
project: ${{ matrix.project }}
project-root: ${{ env.project-root }}
gradle-cache-password: ${{ secrets.GRADLE_BUILD_CACHE_PASSWORD }}
gradle-enterprise-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
gradle-flags: ${{ needs.setup.outputs.gradlew_flags }}
Expand Down
22 changes: 22 additions & 0 deletions buildSrc/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
* limitations under the License.
*/

plugins {
id 'com.gradle.enterprise' version "3.16.2"
}

include ":jetpad-integration"
include ":plugins"
include ":private"
Expand Down Expand Up @@ -42,3 +46,21 @@ dependencyResolutionManagement {
}
}
}
def isCI = System.getenv("CI") == "true"

gradleEnterprise {
server = "https://ge.androidx.dev"
}

buildCache {
local {
// Aggressively clean up stale build cache entries on CI
if (isCI) {
removeUnusedEntriesAfterDays = 1
}
}
remote(gradleEnterprise.buildCache) {
def accessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY")
push = isCI && accessKey
}
}
21 changes: 21 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,27 @@
<sha256 value="47a89be0fa0fedd476db5fd2c83487654d2a119c391f83a142be876667cf7dab" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="com.gradle" name="common-custom-user-data-gradle-plugin" version="1.13">
<artifact name="common-custom-user-data-gradle-plugin-1.13.jar">
<sha256 value="e07ce4b91cdb772bc9ab84f82c53f93f027c404ba07dcc9046f830942558f746" origin="Generated by Gradle"/>
</artifact>
<artifact name="common-custom-user-data-gradle-plugin-1.13.module">
<sha256 value="9b681fd32bd1059430332ec9d169c5fc6afffecdbbbd5a2de4774351548b0f9c" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.gradle" name="gradle-enterprise-gradle-plugin" version="3.16.2">
<artifact name="gradle-enterprise-gradle-plugin-3.16.2.jar">
<sha256 value="e06ca9b1bf0fef710dc74ec969e5c0b4553b92a46224326165ceac0e5c37e0d3" origin="Generated by Gradle"/>
</artifact>
<artifact name="gradle-enterprise-gradle-plugin-3.16.2.module">
<sha256 value="94297bb28ac31e939601bd9b36ed58a90956cb7032332e19940b019dd419da7b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.gradle.enterprise" name="com.gradle.enterprise.gradle.plugin" version="3.16.2">
<artifact name="com.gradle.enterprise.gradle.plugin-3.16.2.pom">
8000 <sha256 value="c1b801d5be47afc8a48a07036a404619a9482c2fa5e12b2029bf511bb860977b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="javax.annotation" name="jsr250-api" version="1.0">
<artifact name="jsr250-api-1.0.jar">
<sha256 value="a1a922d0d9b6d183ed3800dfac01d1e1eb159f0e8c6f94736931c1def54a941f" origin="Generated by Gradle"/>
Expand Down
4 changes: 2 additions & 2 deletions playground-common/playground-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ plugins {

dependencies {
implementation(project(":shared"))
implementation("com.gradle:gradle-enterprise-gradle-plugin:3.16")
implementation("com.gradle:common-custom-user-data-gradle-plugin:1.12")
implementation("com.gradle:gradle-enterprise-gradle-plugin:3.16.2")
implementation("com.gradle:common-custom-user-data-gradle-plugin:1.13")
implementation("supportBuildSrc:private")
implementation("supportBuildSrc:public")
implementation("supportBuildSrc:plugins")
Expand Down
28 changes: 15 additions & 13 deletions playground-common/playground-plugin/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ pluginManagement {
google()
gradlePluginPortal().content {
it.includeModule("org.jetbrains.kotlin.jvm", "org.jetbrains.kotlin.jvm.gradle.plugin")
it.includeModule("com.gradle.enterprise", "com.gradle.enterprise.gradle.plugin")
it.includeModule("com.gradle", "gradle-enterprise-gradle-plugin")
}
}
}

plugins {
id("com.gradle.enterprise") version "3.16.2"
}

dependencyResolutionManagement {
repositories {
mavenCentral()
Expand Down Expand Up @@ -59,24 +65,20 @@ include(":shared")
// so that when building the `playground-plugin` included build the same build cache settings will be used.
// Without this, Gradle Enterprise erroneously reports a problem with 'buildSrc' build cache configuration.
def isCI = System.getenv("CI") == "true"

gradleEnterprise {
server = "https://ge.androidx.dev"
}

buildCache {
local {
// Aggressively clean up stale build cache entries on CI
if (isCI) {
removeUnusedEntriesAfterDays = 1
}
}
remote(HttpBuildCache) {
url = "https://ge.androidx.dev/cache/"
var buildCachePassword = System.getenv("GRADLE_BUILD_CACHE_PASSWORD")
if (isCI && buildCachePassword != null && !buildCachePassword.empty) {
push = true
credentials {
username = "ci"
password = buildCachePassword
}
} else {
push = false
}
}
remote(gradleEnterprise.buildCache) {
def accessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY")
push = isCI && accessKey
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package androidx.playground
import com.gradle.enterprise.gradleplugin.internal.extension.BuildScanExtensionWithHiddenFeatures
import org.gradle.api.Plugin
import org.gradle.api.initialization.Settings
import org.gradle.caching.http.HttpBuildCache
import org.gradle.kotlin.dsl.gradleEnterprise
import java.net.InetAddress
import java.net.URI
Expand Down Expand Up @@ -54,18 +53,10 @@ class GradleEnterpriseConventionsPlugin : Plugin<Settings> {
}
}

settings.buildCache.remote(HttpBuildCache::class.java) { remote ->
remote.url = URI("https://ge.androidx.dev/cache/")
val buildCachePassword = System.getenv("GRADLE_BUILD_CACHE_PASSWORD")
if (isCI && !buildCachePassword.isNullOrEmpty()) {
remote.isPush = true
remote.credentials { credentials ->
credentials.username = "ci"
credentials.password = buildCachePassword
}
} else {
remote.isPush = false
}
settings.buildCache.remote(settings.gradleEnterprise.buildCache) { remote ->
val develocityAccessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY")
remote.setEnabled(true)
remote.isPush = isCI && !develocityAccessKey.isNullOrEmpty()
}
}

Expand Down
2 changes: 0 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ buildscript {
classpath("com.google.protobuf:protobuf-java:3.22.3")
// upgrade okio for gcpbuildcache that is compatible with the wire plugin used by androidx
classpath("com.squareup.okio:okio:3.3.0")
classpath("com.gradle:gradle-enterprise-gradle-plugin:3.16")
classpath("com.gradle:common-custom-user-data-gradle-plugin:1.12")
classpath("androidx.build.gradle.gcpbuildcache:gcpbuildcache:1.0.0-beta07")
}
}
Expand Down
0