This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Artifact Cache CLI / Gradle + npm template for GitLab CI | |
| # | |
| # Adapted from the official GitHub Actions example at: | |
| # https://docs.gradle.com/develocity/artifact-cache/1.2/how-to/configure-github-actions/#complete-workflow-example | |
| # | |
| # The Artifact Cache CLI is downloaded directly from the public Develocity | |
| # download location, so no repository credentials are required: | |
| # https://docs.gradle.com/develocity/artifact-cache/1.2/#download | |
| # | |
| # DEVELOCITY_ACCESS_KEY is expected to be injected as a masked env var at the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Artifact Cache CLI / Maven template for GitLab CI | |
| # | |
| # Adapted from the official GitHub Actions example at: | |
| # https://docs.gradle.com/develocity/artifact-cache/1.1/how-to/configure-github-actions/#complete-workflow-example | |
| # | |
| # Required CI/CD variables (Settings -> CI/CD -> Variables, masked + protected): | |
| # - ARTIFACT_CACHE_REPO_USERNAME | |
| # - ARTIFACT_CACHE_REPO_PASSWORD | |
| # | |
| # DEVELOCITY_ACCESS_KEY is expected to be injected as a masked env var at the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| log.debug('Evaluating custom Develocity logic') | |
| buildCache.registerMojoMetadataProvider(context -> { | |
| context.withPlugin("openapi-generator-maven-plugin", () -> { | |
| if ("generate".equals(context.getMojoExecution().getGoal())) { | |
| log.debug('Configuring OpenAPI code generator caching') | |
| context.inputs(inputs -> { | |
| try { | |
| List<String> compileClasspathElements = context.getProject().getCompileClasspathElements(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.gradle.develocity.agent.gradle.scan.BuildScanConfiguration | |
| import org.gradle.api.internal.project.ProjectInternal | |
| import org.gradle.api.services.BuildService | |
| import org.gradle.api.services.BuildServiceParameters | |
| import org.gradle.tooling.events.FinishEvent | |
| import org.gradle.tooling.events.OperationCompletionListener | |
| import java.time.Instant | |
| object Capture { | |
| var startTime: Long = 0L |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| log.debug('Evaluating custom Develocity logic') | |
| buildCache.registerMojoMetadataProvider(context -> { | |
| context.withPlugin("gwt-maven-plugin", () -> { | |
| if ("compile".equals(context.getMojoExecution().getGoal())) { | |
| log.debug('Configuring GWT caching') | |
| context.inputs(inputs -> { | |
| try { | |
| List<String> compileClasspathElements = context.getProject().getCompileClasspathElements(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Parse CLI arguments | |
| if [[ $# -lt 3 ]]; then | |
| echo "Usage: $0 <develocity_url> <access_key> <from_instant_in_ms>" | |
| exit 1 | |
| fi | |
| # Init parameters | |
| readonly develocityUrl=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Parse CLI arguments | |
| if [[ $# -lt 3 ]]; then | |
| echo "Usage: $0 <develocity_url> <access_key> <yyyy-mm>" | |
| exit 1 | |
| fi | |
| # Init parameters | |
| readonly develocityUrl=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM bellsoft/liberica-openjdk-alpine:21 | |
| RUN apk add maven | |
| ENV MAVEN_HOME=/usr/share/java/maven-3 | |
| # Collect convention extension from binary manager | |
| #RUN mkdir -p $MAVEN_HOME/lib/ext | |
| #ADD https://my-repo-hostname/repo/com/myorg/1.0/develocity-convention-extension-1.0.jar $MAVEN_HOME/lib/ext |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.myorg; | |
| import com.gradle.develocity.agent.maven.api.DevelocityApi; | |
| import com.gradle.develocity.agent.maven.api.DevelocityListener; | |
| import com.gradle.develocity.agent.maven.api.cache.BuildCacheApi; | |
| import com.gradle.develocity.agent.maven.api.scan.BuildScanApi; | |
| import org.apache.maven.execution.MavenSession; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Parse CLI arguments | |
| if [[ $# -lt 3 ]]; then | |
| echo "Usage: $0 <develocity_url> <access_key> <yyyy-mm>" | |
| exit 1 | |
| fi | |
| # Init parameters | |
| readonly develocityUrl=$1 |
NewerOlder