-
Notifications
You must be signed in to change notification settings - Fork 2
added maven proxy and gradle cache #71
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: Setup Gradle Cache | ||
| description: Configures burrunan/gradle-cache-action for caching Gradle dependencies | ||
|
|
||
| inputs: | ||
| job-id: | ||
| description: Job ID for cache scoping (e.g. JDK version) | ||
| required: true | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Gradle Cache | ||
| uses: burrunan/gradle-cache-action@v3 | ||
| with: | ||
| job-id: ${{ inputs.job-id }} | ||
| gradle-dependencies-cache-key: | | ||
| **/*.gradle* | ||
| **/gradle-wrapper.properties | ||
| **/libs.versions.toml | ||
| save-gradle-dependencies-cache: true | ||
| save-maven-dependencies-cache: false | ||
| save-local-build-cache: false | ||
| concurrent: true | ||
| gradle-distribution-sha-256-sum-warning: false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| name: Setup Ubique Maven Proxy | ||
| description: Installs a Gradle init script that adds the Ubique public Maven proxy to all projects and plugins | ||
|
|
||
| inputs: | ||
| maven-proxy-url: | ||
| description: Artifactory URL (with /android suffix, which will be replaced with /remote-merged-maven) | ||
| required: true | ||
| maven-proxy-username: | ||
| description: Artifactory username for Maven proxy authentication | ||
| required: true | ||
| maven-proxy-password: | ||
| description: Artifactory password for Maven proxy authentication | ||
| required: true | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Install Gradle init script for Maven proxy | ||
| if: ${{ inputs.maven-proxy-url != '' && inputs.maven-proxy-username != '' && inputs.maven-proxy-password != '' }} | ||
| shell: bash | ||
| env: | ||
| ARTIFACTORY_URL: ${{ inputs.maven-proxy-url }} | ||
| ARTIFACTORY_USERNAME: ${{ inputs.maven-proxy-username }} | ||
| ARTIFACTORY_PASSWORD: ${{ inputs.maven-proxy-password }} | ||
| run: | | ||
| mkdir -p ~/.gradle/init.d | ||
| PROXY_URL=$(echo "$ARTIFACTORY_URL" | sed 's|/android|/remote-merged-maven|') | ||
|
fbzli marked this conversation as resolved.
|
||
| cat > ~/.gradle/init.d/ubique-maven-proxy.gradle << EOF | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wieso Groovy statt Kotlin Script?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Proxy kommt eh weider raus, daher hinfällig. |
||
| def proxy = { repo -> | ||
| repo.maven { | ||
| url = "${PROXY_URL}" | ||
| credentials { | ||
| username = '${ARTIFACTORY_USERNAME}' | ||
| password = '${ARTIFACTORY_PASSWORD}' | ||
| } | ||
| authentication { | ||
| basic(BasicAuthentication) | ||
| digest(DigestAuthentication) | ||
| } | ||
| } | ||
| } | ||
| beforeSettings { settings -> | ||
| settings.pluginManagement { | ||
| repositories { proxy(delegate) } | ||
| } | ||
| settings.dependencyResolutionManagement { | ||
| repositoriesMode.set(RepositoriesMode.PREFER_PROJECT) | ||
| repositories { proxy(delegate) } | ||
| } | ||
| } | ||
| EOF | ||
|
fbzli marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,6 +71,10 @@ jobs: | |
| 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 }}' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wieso hier nicht
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. |
||
| maven-proxy-username: ${{ secrets.UB_ARTIFACTORY_USER }} | ||
| maven-proxy-password: ${{ secrets.UB_ARTIFACTORY_PASSWORD }} | ||
| gradle-cache-job-id: '${{ inputs.jdk }}-${{ inputs.task }}' | ||
|
|
||
| - name: Run Gradle task | ||
| run: ./gradlew ${{ inputs.task }} ${{ inputs.gradle-args }} ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.