Instate shadow jobs (#1923)
This commit is contained in:
parent
5f4bc7fafd
commit
9d3312611e
11 changed files with 117 additions and 25 deletions
4
.github/workflows/deploy_github_releases.yml
vendored
4
.github/workflows/deploy_github_releases.yml
vendored
|
@ -15,7 +15,7 @@ jobs:
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v3.3.0
|
uses: actions/setup-java@v3.3.0
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Decrypt secrets
|
- name: Decrypt secrets
|
||||||
|
@ -27,7 +27,7 @@ jobs:
|
||||||
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
||||||
|
|
||||||
- name: Build release binaries
|
- name: Build release binaries
|
||||||
uses: gradle/gradle-build-action@v2.1.6
|
uses: gradle/gradle-build-action@v2.2.0-beta.1
|
||||||
with:
|
with:
|
||||||
arguments: --no-configuration-cache :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease
|
arguments: --no-configuration-cache :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v3.3.0
|
uses: actions/setup-java@v3.3.0
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Determine publishing task
|
- name: Determine publishing task
|
||||||
|
@ -30,7 +30,7 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Upload binaries
|
- name: Upload binaries
|
||||||
uses: gradle/gradle-build-action@v2.1.6
|
uses: gradle/gradle-build-action@v2.2.0-beta.1
|
||||||
with:
|
with:
|
||||||
arguments: --no-configuration-cache :${{ steps.task-select.outputs.PROJECT }}:publishAllPublicationsToMavenCentralRepository
|
arguments: --no-configuration-cache :${{ steps.task-select.outputs.PROJECT }}:publishAllPublicationsToMavenCentralRepository
|
||||||
env:
|
env:
|
||||||
|
@ -40,7 +40,7 @@ jobs:
|
||||||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.NEXUS_PUBLISH_GPG_KEY_PASSWORD }}
|
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.NEXUS_PUBLISH_GPG_KEY_PASSWORD }}
|
||||||
|
|
||||||
- name: Close and release repository
|
- name: Close and release repository
|
||||||
uses: gradle/gradle-build-action@v2.1.6
|
uses: gradle/gradle-build-action@v2.2.0-beta.1
|
||||||
with:
|
with:
|
||||||
arguments: --no-configuration-cache closeAndReleaseRepository
|
arguments: --no-configuration-cache closeAndReleaseRepository
|
||||||
env:
|
env:
|
||||||
|
|
4
.github/workflows/deploy_snapshot.yml
vendored
4
.github/workflows/deploy_snapshot.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v3.3.0
|
uses: actions/setup-java@v3.3.0
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Decrypt secrets
|
- name: Decrypt secrets
|
||||||
|
@ -29,7 +29,7 @@ jobs:
|
||||||
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
||||||
|
|
||||||
- name: Build release app
|
- name: Build release app
|
||||||
uses: gradle/gradle-build-action@v2.1.6
|
uses: gradle/gradle-build-action@v2.2.0-beta.1
|
||||||
env:
|
env:
|
||||||
SNAPSHOT: "true"
|
SNAPSHOT: "true"
|
||||||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
||||||
|
|
2
.github/workflows/draft_new_release.yml
vendored
2
.github/workflows/draft_new_release.yml
vendored
|
@ -39,7 +39,7 @@ jobs:
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v3.3.0
|
uses: actions/setup-java@v3.3.0
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Update changelog
|
- name: Update changelog
|
||||||
|
|
24
.github/workflows/pull_request.yml
vendored
24
.github/workflows/pull_request.yml
vendored
|
@ -31,7 +31,7 @@ jobs:
|
||||||
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
||||||
uses: actions/setup-java@v3.3.0
|
uses: actions/setup-java@v3.3.0
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Copy CI gradle.properties
|
- name: Copy CI gradle.properties
|
||||||
|
@ -40,7 +40,7 @@ jobs:
|
||||||
|
|
||||||
- name: Check codestyle
|
- name: Check codestyle
|
||||||
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
||||||
uses: gradle/gradle-build-action@v2.1.6
|
uses: gradle/gradle-build-action@v2.2.0-beta.1
|
||||||
with:
|
with:
|
||||||
arguments: --no-configuration-cache spotlessCheck
|
arguments: --no-configuration-cache spotlessCheck
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ jobs:
|
||||||
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
||||||
uses: actions/setup-java@v3.3.0
|
uses: actions/setup-java@v3.3.0
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Copy CI gradle.properties
|
- name: Copy CI gradle.properties
|
||||||
|
@ -74,7 +74,7 @@ jobs:
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
||||||
uses: gradle/gradle-build-action@v2.1.6
|
uses: gradle/gradle-build-action@v2.2.0-beta.1
|
||||||
with:
|
with:
|
||||||
arguments: --no-configuration-cache test -PslimTests
|
arguments: --no-configuration-cache test -PslimTests
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ jobs:
|
||||||
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
||||||
uses: actions/setup-java@v3.3.0
|
uses: actions/setup-java@v3.3.0
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Copy CI gradle.properties
|
- name: Copy CI gradle.properties
|
||||||
|
@ -115,7 +115,7 @@ jobs:
|
||||||
|
|
||||||
- name: Build debug APKs
|
- name: Build debug APKs
|
||||||
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
||||||
uses: gradle/gradle-build-action@v2.1.6
|
uses: gradle/gradle-build-action@v2.2.0-beta.1
|
||||||
with:
|
with:
|
||||||
arguments: --no-configuration-cache assembleFreeDebug assembleNonFreeDebug
|
arguments: --no-configuration-cache assembleFreeDebug assembleNonFreeDebug
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ jobs:
|
||||||
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
||||||
uses: actions/setup-java@v3.3.0
|
uses: actions/setup-java@v3.3.0
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Copy CI gradle.properties
|
- name: Copy CI gradle.properties
|
||||||
|
@ -149,7 +149,7 @@ jobs:
|
||||||
|
|
||||||
- name: Check library API
|
- name: Check library API
|
||||||
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
||||||
uses: gradle/gradle-build-action@v2.1.6
|
uses: gradle/gradle-build-action@v2.2.0-beta.1
|
||||||
with:
|
with:
|
||||||
arguments: --no-configuration-cache apiCheck
|
arguments: --no-configuration-cache apiCheck
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ jobs:
|
||||||
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
||||||
uses: actions/setup-java@v3.3.0
|
uses: actions/setup-java@v3.3.0
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Copy CI gradle.properties
|
- name: Copy CI gradle.properties
|
||||||
|
@ -183,7 +183,7 @@ jobs:
|
||||||
|
|
||||||
- name: Run Lint on debug variants
|
- name: Run Lint on debug variants
|
||||||
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
||||||
uses: gradle/gradle-build-action@v2.1.6
|
uses: gradle/gradle-build-action@v2.2.0-beta.1
|
||||||
with:
|
with:
|
||||||
arguments: --no-configuration-cache lintDebug
|
arguments: --no-configuration-cache lintDebug
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ jobs:
|
||||||
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
||||||
uses: actions/setup-java@v3.3.0
|
uses: actions/setup-java@v3.3.0
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Copy CI gradle.properties
|
- name: Copy CI gradle.properties
|
||||||
|
@ -217,6 +217,6 @@ jobs:
|
||||||
|
|
||||||
- name: Assemble non-free release
|
- name: Assemble non-free release
|
||||||
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
if: "${{ steps.service-changed.outputs.result == 'true' }}"
|
||||||
uses: gradle/gradle-build-action@v2.1.6
|
uses: gradle/gradle-build-action@v2.2.0-beta.1
|
||||||
with:
|
with:
|
||||||
arguments: --no-configuration-cache aNFR
|
arguments: --no-configuration-cache aNFR
|
||||||
|
|
47
.github/workflows/shadow_job.yml
vendored
Normal file
47
.github/workflows/shadow_job.yml
vendored
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
|
env:
|
||||||
|
SENTRY_DSN: 'https://public_key@example.com/project_id'
|
||||||
|
|
||||||
|
name: Shadow job with latest Gradle and Java
|
||||||
|
jobs:
|
||||||
|
shadow-job:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
agp-version:
|
||||||
|
- 7.2.0
|
||||||
|
- 7.3.0-beta01
|
||||||
|
- 7.4.0-alpha02
|
||||||
|
gradle-version:
|
||||||
|
- wrapper
|
||||||
|
- nightly
|
||||||
|
java-version:
|
||||||
|
- 11
|
||||||
|
- 17
|
||||||
|
- 18
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3.0.2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up JDK
|
||||||
|
uses: actions/setup-java@v3.3.0
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: ${{ matrix.java-version }}
|
||||||
|
|
||||||
|
- name: Copy CI gradle.properties
|
||||||
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
||||||
|
|
||||||
|
- name: Run checks
|
||||||
|
uses: gradle/gradle-build-action@v2.2.0-beta.1
|
||||||
|
env:
|
||||||
|
GRADLE_VERSION_OVERRIDE_com_android_tools_build_gradle: ${{ matrix.agp-version }}
|
||||||
|
with:
|
||||||
|
arguments: --no-configuration-cache check
|
4
.github/workflows/sync_crowdin.yml
vendored
4
.github/workflows/sync_crowdin.yml
vendored
|
@ -14,11 +14,11 @@ jobs:
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v3.3.0
|
uses: actions/setup-java@v3.3.0
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Download new translations from Crowdin
|
- name: Download new translations from Crowdin
|
||||||
uses: gradle/gradle-build-action@v2.1.6
|
uses: gradle/gradle-build-action@v2.2.0-beta.1
|
||||||
with:
|
with:
|
||||||
arguments: --no-configuration-cache crowdin
|
arguments: --no-configuration-cache crowdin
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -14,11 +14,11 @@ jobs:
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v3.3.0
|
uses: actions/setup-java@v3.3.0
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Download new publicsuffix data
|
- name: Download new publicsuffix data
|
||||||
uses: gradle/gradle-build-action@v2.1.6
|
uses: gradle/gradle-build-action@v2.2.0-beta.1
|
||||||
with:
|
with:
|
||||||
arguments: --no-configuration-cache updatePSL
|
arguments: --no-configuration-cache updatePSL
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ jobs:
|
||||||
run: if [[ $(git diff --binary --stat) != "" ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi
|
run: if [[ $(git diff --binary --stat) != "" ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi
|
||||||
|
|
||||||
- name: Verify update publicsuffixes file
|
- name: Verify update publicsuffixes file
|
||||||
uses: gradle/gradle-build-action@v2.1.6
|
uses: gradle/gradle-build-action@v2.2.0-beta.1
|
||||||
if: "${{ env.UPDATED == 'true' }}"
|
if: "${{ env.UPDATED == 'true' }}"
|
||||||
with:
|
with:
|
||||||
arguments: --no-configuration-cache :autofill-parser:test -PslimTests
|
arguments: --no-configuration-cache :autofill-parser:test -PslimTests
|
||||||
|
|
|
@ -39,3 +39,17 @@ dependencies {
|
||||||
implementation(libs.build.semver)
|
implementation(libs.build.semver)
|
||||||
implementation(libs.build.sentry)
|
implementation(libs.build.sentry)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configurations.all {
|
||||||
|
resolutionStrategy.eachDependency {
|
||||||
|
val overrideName =
|
||||||
|
"GRADLE_VERSION_OVERRIDE_${requested.group.replace('.', '_')}_${requested.name}"
|
||||||
|
val overridenVersion = System.getenv(overrideName)
|
||||||
|
if (!overridenVersion.isNullOrEmpty()) {
|
||||||
|
project.logger.lifecycle(
|
||||||
|
"Overriding dependency ${requested.group}:${requested.name} to version ${overridenVersion}"
|
||||||
|
)
|
||||||
|
useVersion(overridenVersion)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -30,3 +30,17 @@ dependencies {
|
||||||
implementation(libs.build.kotlin)
|
implementation(libs.build.kotlin)
|
||||||
implementation(libs.build.spotless)
|
implementation(libs.build.spotless)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configurations.all {
|
||||||
|
resolutionStrategy.eachDependency {
|
||||||
|
val overrideName =
|
||||||
|
"GRADLE_VERSION_OVERRIDE_${requested.group.replace('.', '_')}_${requested.name}"
|
||||||
|
val overridenVersion = System.getenv(overrideName)
|
||||||
|
if (!overridenVersion.isNullOrEmpty()) {
|
||||||
|
project.logger.lifecycle(
|
||||||
|
"Overriding dependency ${requested.group}:${requested.name} to version ${overridenVersion}"
|
||||||
|
)
|
||||||
|
useVersion(overridenVersion)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -27,10 +27,27 @@ pluginManagement {
|
||||||
includeGroup("com.google.testing.platform")
|
includeGroup("com.google.testing.platform")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
exclusiveContent {
|
||||||
|
forRepository(::gradlePluginPortal)
|
||||||
|
filter {
|
||||||
|
includeModule("com.gradle", "gradle-enterprise-gradle-plugin")
|
||||||
|
includeModule("com.gradle.enterprise", "com.gradle.enterprise.gradle.plugin")
|
||||||
|
}
|
||||||
|
}
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins { id("com.gradle.enterprise") version "3.10.1" }
|
||||||
|
|
||||||
|
gradleEnterprise {
|
||||||
|
buildScan {
|
||||||
|
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
||||||
|
termsOfServiceAgree = if (System.getenv("GITHUB_WORKFLOW").isNullOrEmpty()) "no" else "yes"
|
||||||
|
publishOnFailureIf(!System.getenv("GITHUB_WORKFLOW").isNullOrEmpty())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||||
repositories {
|
repositories {
|
||||||
|
|
Loading…
Reference in a new issue