aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-05-25 17:59:04 +0530
committerGitHub <noreply@github.com>2022-05-25 12:29:04 +0000
commit9d3312611e3f16414d60a717770befeedec9319b (patch)
tree0eedd70adc834d5b4f7b6455fccad034d33586f5
parent5f4bc7fafde92f18453571054dbdc3b29d196416 (diff)
Instate shadow jobs (#1923)
-rw-r--r--.github/workflows/deploy_github_releases.yml4
-rw-r--r--.github/workflows/deploy_library_releases.yml6
-rw-r--r--.github/workflows/deploy_snapshot.yml4
-rw-r--r--.github/workflows/draft_new_release.yml2
-rw-r--r--.github/workflows/pull_request.yml24
-rw-r--r--.github/workflows/shadow_job.yml47
-rw-r--r--.github/workflows/sync_crowdin.yml4
-rw-r--r--.github/workflows/update_publicsuffix_data.yml6
-rw-r--r--build-logic/android-plugins/build.gradle.kts14
-rw-r--r--build-logic/kotlin-plugins/build.gradle.kts14
-rw-r--r--settings.gradle.kts17
11 files changed, 117 insertions, 25 deletions
diff --git a/.github/workflows/deploy_github_releases.yml b/.github/workflows/deploy_github_releases.yml
index b467ac28..a8b639c2 100644
--- a/.github/workflows/deploy_github_releases.yml
+++ b/.github/workflows/deploy_github_releases.yml
@@ -15,7 +15,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3.3.0
with:
- distribution: zulu
+ distribution: temurin
java-version: 17
- name: Decrypt secrets
@@ -27,7 +27,7 @@ jobs:
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Build release binaries
- uses: gradle/gradle-build-action@v2.1.6
+ uses: gradle/gradle-build-action@v2.2.0-beta.1
with:
arguments: --no-configuration-cache :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease
env:
diff --git a/.github/workflows/deploy_library_releases.yml b/.github/workflows/deploy_library_releases.yml
index e0faa3bd..afa9c522 100644
--- a/.github/workflows/deploy_library_releases.yml
+++ b/.github/workflows/deploy_library_releases.yml
@@ -15,7 +15,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3.3.0
with:
- distribution: zulu
+ distribution: temurin
java-version: 17
- name: Determine publishing task
@@ -30,7 +30,7 @@ jobs:
fi
- name: Upload binaries
- uses: gradle/gradle-build-action@v2.1.6
+ uses: gradle/gradle-build-action@v2.2.0-beta.1
with:
arguments: --no-configuration-cache :${{ steps.task-select.outputs.PROJECT }}:publishAllPublicationsToMavenCentralRepository
env:
@@ -40,7 +40,7 @@ jobs:
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.NEXUS_PUBLISH_GPG_KEY_PASSWORD }}
- name: Close and release repository
- uses: gradle/gradle-build-action@v2.1.6
+ uses: gradle/gradle-build-action@v2.2.0-beta.1
with:
arguments: --no-configuration-cache closeAndReleaseRepository
env:
diff --git a/.github/workflows/deploy_snapshot.yml b/.github/workflows/deploy_snapshot.yml
index 2967041a..eeaac2bf 100644
--- a/.github/workflows/deploy_snapshot.yml
+++ b/.github/workflows/deploy_snapshot.yml
@@ -17,7 +17,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3.3.0
with:
- distribution: zulu
+ distribution: temurin
java-version: 17
- name: Decrypt secrets
@@ -29,7 +29,7 @@ jobs:
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Build release app
- uses: gradle/gradle-build-action@v2.1.6
+ uses: gradle/gradle-build-action@v2.2.0-beta.1
env:
SNAPSHOT: "true"
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
diff --git a/.github/workflows/draft_new_release.yml b/.github/workflows/draft_new_release.yml
index 631121cd..a0223f79 100644
--- a/.github/workflows/draft_new_release.yml
+++ b/.github/workflows/draft_new_release.yml
@@ -39,7 +39,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3.3.0
with:
- distribution: zulu
+ distribution: temurin
java-version: 17
- name: Update changelog
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index ef06db8b..cbc2b9c2 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -31,7 +31,7 @@ jobs:
if: "${{ steps.service-changed.outputs.result == 'true' }}"
uses: actions/setup-java@v3.3.0
with:
- distribution: zulu
+ distribution: temurin
java-version: 17
- name: Copy CI gradle.properties
@@ -40,7 +40,7 @@ jobs:
- name: Check codestyle
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:
arguments: --no-configuration-cache spotlessCheck
@@ -65,7 +65,7 @@ jobs:
if: "${{ steps.service-changed.outputs.result == 'true' }}"
uses: actions/setup-java@v3.3.0
with:
- distribution: zulu
+ distribution: temurin
java-version: 17
- name: Copy CI gradle.properties
@@ -74,7 +74,7 @@ jobs:
- name: Run unit tests
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:
arguments: --no-configuration-cache test -PslimTests
@@ -106,7 +106,7 @@ jobs:
if: "${{ steps.service-changed.outputs.result == 'true' }}"
uses: actions/setup-java@v3.3.0
with:
- distribution: zulu
+ distribution: temurin
java-version: 17
- name: Copy CI gradle.properties
@@ -115,7 +115,7 @@ jobs:
- name: Build debug APKs
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:
arguments: --no-configuration-cache assembleFreeDebug assembleNonFreeDebug
@@ -140,7 +140,7 @@ jobs:
if: "${{ steps.service-changed.outputs.result == 'true' }}"
uses: actions/setup-java@v3.3.0
with:
- distribution: zulu
+ distribution: temurin
java-version: 17
- name: Copy CI gradle.properties
@@ -149,7 +149,7 @@ jobs:
- name: Check library API
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:
arguments: --no-configuration-cache apiCheck
@@ -174,7 +174,7 @@ jobs:
if: "${{ steps.service-changed.outputs.result == 'true' }}"
uses: actions/setup-java@v3.3.0
with:
- distribution: zulu
+ distribution: temurin
java-version: 17
- name: Copy CI gradle.properties
@@ -183,7 +183,7 @@ jobs:
- name: Run Lint on debug variants
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:
arguments: --no-configuration-cache lintDebug
@@ -208,7 +208,7 @@ jobs:
if: "${{ steps.service-changed.outputs.result == 'true' }}"
uses: actions/setup-java@v3.3.0
with:
- distribution: zulu
+ distribution: temurin
java-version: 17
- name: Copy CI gradle.properties
@@ -217,6 +217,6 @@ jobs:
- name: Assemble non-free release
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:
arguments: --no-configuration-cache aNFR
diff --git a/.github/workflows/shadow_job.yml b/.github/workflows/shadow_job.yml
new file mode 100644
index 00000000..14c8af23
--- /dev/null
+++ b/.github/workflows/shadow_job.yml
@@ -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
diff --git a/.github/workflows/sync_crowdin.yml b/.github/workflows/sync_crowdin.yml
index e0e6e95e..19fe5e81 100644
--- a/.github/workflows/sync_crowdin.yml
+++ b/.github/workflows/sync_crowdin.yml
@@ -14,11 +14,11 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3.3.0
with:
- distribution: zulu
+ distribution: temurin
java-version: 17
- 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:
arguments: --no-configuration-cache crowdin
env:
diff --git a/.github/workflows/update_publicsuffix_data.yml b/.github/workflows/update_publicsuffix_data.yml
index f34dc05d..b502a7d4 100644
--- a/.github/workflows/update_publicsuffix_data.yml
+++ b/.github/workflows/update_publicsuffix_data.yml
@@ -14,11 +14,11 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3.3.0
with:
- distribution: zulu
+ distribution: temurin
java-version: 17
- name: Download new publicsuffix data
- uses: gradle/gradle-build-action@v2.1.6
+ uses: gradle/gradle-build-action@v2.2.0-beta.1
with:
arguments: --no-configuration-cache updatePSL
@@ -26,7 +26,7 @@ jobs:
run: if [[ $(git diff --binary --stat) != "" ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi
- 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' }}"
with:
arguments: --no-configuration-cache :autofill-parser:test -PslimTests
diff --git a/build-logic/android-plugins/build.gradle.kts b/build-logic/android-plugins/build.gradle.kts
index 1ffce784..15314965 100644
--- a/build-logic/android-plugins/build.gradle.kts
+++ b/build-logic/android-plugins/build.gradle.kts
@@ -39,3 +39,17 @@ dependencies {
implementation(libs.build.semver)
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)
+ }
+ }
+}
diff --git a/build-logic/kotlin-plugins/build.gradle.kts b/build-logic/kotlin-plugins/build.gradle.kts
index 6d2606ed..3984c2a6 100644
--- a/build-logic/kotlin-plugins/build.gradle.kts
+++ b/build-logic/kotlin-plugins/build.gradle.kts
@@ -30,3 +30,17 @@ dependencies {
implementation(libs.build.kotlin)
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)
+ }
+ }
+}
diff --git a/settings.gradle.kts b/settings.gradle.kts
index b47b7cba..1d7993b1 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -27,10 +27,27 @@ pluginManagement {
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()
}
}
+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 {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {