added maven proxy and gradle cache#71
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an Ubique Maven proxy (via a Gradle init script) and burrunan/gradle-cache-action-based Gradle dependency caching into the shared Android composite actions, and wires the corresponding Artifactory secrets and cache-job-id values through all top-level workflow templates.
Changes:
- New composite actions
maven-proxy-setup(generates a~/.gradle/init.d/ubique-maven-proxy.gradleinit script with auth) andgradle-cache-setup(wrapsburrunan/gradle-cache-action@v3). android-base-setup(andandroid-app-setup) gain four new required inputs (maven-proxy-url/username/password, gradle-cache-job-id) and invoke the two new actions.- All caller workflows pass
UB_ARTIFACTORY_*secrets and a${jdk}-${module|task}cache job id.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/actions/maven-proxy-setup/action.yml | New action that writes a Gradle init script adding the Artifactory proxy as the plugin/dependency repository with credentials. |
| .github/actions/gradle-cache-setup/action.yml | New action wrapping burrunan/gradle-cache-action with a fixed cache-key set. |
| .github/actions/android-base-setup/action.yml | Adds 4 required inputs and calls the new maven-proxy and gradle-cache actions after JDK setup. |
| .github/actions/android-app-setup/action.yml | Forwards the new inputs through to android-base-setup. |
| .github/workflows/android_library_artifactory.yml | Passes Artifactory secrets and jdk-lib-module cache id to the setup action. |
| .github/workflows/android_gradle_task.yml | Passes Artifactory URL (composed from two secrets) and jdk-task cache id. |
| .github/workflows/android_code_quality.yml | Passes Artifactory secrets and jdk-app-module cache id in both setup invocations. |
| .github/workflows/android_build_store_upload.yml | Same plumbing in both setup steps. |
| .github/workflows/android_build_alpaka_upload.yml | Same plumbing in the build setup step. |
Comments suppressed due to low confidence (1)
.github/actions/maven-proxy-setup/action.yml:35
- The credentials are interpolated into the Groovy file inside single-quoted strings (
username = '${ARTIFACTORY_USERNAME}'). If the username or password contains a single quote, the generated init script will be syntactically invalid and Gradle will fail to start. Reading the values from environment variables at Gradle runtime (System.getenv('ARTIFACTORY_USERNAME')) avoids this quoting hazard entirely and also keeps the secrets out of an on-disk file.
credentials {
username = '${ARTIFACTORY_USERNAME}'
password = '${ARTIFACTORY_PASSWORD}'
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: | | ||
| mkdir -p ~/.gradle/init.d | ||
| PROXY_URL=$(echo "$ARTIFACTORY_URL" | sed 's|/android|/remote-merged-maven|') | ||
| cat > ~/.gradle/init.d/ubique-maven-proxy.gradle << EOF |
There was a problem hiding this comment.
Wieso Groovy statt Kotlin Script?
There was a problem hiding this comment.
Proxy kommt eh weider raus, daher hinfällig.
| use-git-lfs: ${{ inputs.use-git-lfs }} | ||
| jdk: ${{ inputs.jdk }} | ||
| setup-rust: 'false' | ||
| maven-proxy-url: '${{ secrets.UB_ARTIFACTORY_URL }}${{ secrets.UB_ARTIFACTORY_REPO_ANDROID }}' |
There was a problem hiding this comment.
Wieso hier nicht secrets.UB_ARTIFACTORY_URL_ANDROID wie bei den anderen Workflows?
There was a problem hiding this comment.
android_gradle_task.yml wird teils für Artifactory-Deployments gebraucht, darum sind die beiden Secrets hier gesplittet. Das maven-proxy-url fliegt aber eh wieder raus, siehe oben.
Depends on #69