Skip to content

Commit 6ed245f

Browse files
bitrise-devs-botBitrise CIzsolt-marta-bitriseBadlazzor
authored
chore: Update Gradle plugins (#140)
* feat: update plugins to release * fix: Print init gradle file * fix: Add info logs * fix: Add common dep * fix: Add --stacktrace * fix: Check deps * tmp: remove local and GAR * tmp: re-add local but remove plugin download * fix: Log key * fix: Remove GAR * fix: Remove (i) * Update analyitcs 2.1.30 * Fix verification metadata --------- Co-authored-by: Bitrise CI <[email protected]> Co-authored-by: zsolt-marta-bitrise <[email protected]> Co-authored-by: Balázs Hajagos <[email protected]>
1 parent 9eb8fbe commit 6ed245f

10 files changed

+66
-41
lines changed

bitrise.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,17 @@ workflows:
253253
- content: |-
254254
set -exo pipefail
255255
../bitrise-build-cache-cli activate gradle -d --cache
256+
- script:
257+
title: Print ~/.init.d/bitrise-build-cache.init.gradle.kts
258+
inputs:
259+
- content: |-
260+
cat ~/.gradle/init.d/bitrise-build-cache.init.gradle.kts
256261
- script:
257262
title: Build and capture logs
258263
inputs:
259264
- content: |-
260265
set -exo pipefail
261-
(./gradlew debug 2>&1) | tee "$BITRISE_DEPLOY_DIR/logs.txt"
266+
(./gradlew debug --info --stacktrace 2>&1) | tee "$BITRISE_DEPLOY_DIR/logs.txt"
262267
- script:
263268
title: Check for cache invocations
264269
inputs:
@@ -283,12 +288,17 @@ workflows:
283288
- content: |-
284289
set -exo pipefail
285290
../bitrise-build-cache-cli activate gradle -d --cache
291+
- script:
292+
title: Print ~/.init.d/bitrise-build-cache.init.gradle.kts
293+
inputs:
294+
- content: |-
295+
cat ~/.gradle/init.d/bitrise-build-cache.init.gradle.kts
286296
- script:
287297
title: Create local configuration cache
288298
inputs:
289299
- content: |-
290300
set -exo pipefail
291-
./gradlew debug --configuration-cache --dry-run
301+
./gradlew debug --configuration-cache --dry-run --info --stacktrace
292302
- script:
293303
title: Save configuration cache
294304
inputs:
@@ -315,7 +325,7 @@ workflows:
315325
inputs:
316326
- content: |-
317327
set -exo pipefail
318-
(./gradlew debug --configuration-cache 2>&1) | tee "$BITRISE_DEPLOY_DIR/logs.txt"
328+
(./gradlew debug --configuration-cache --info --stacktrace 2>&1) | tee "$BITRISE_DEPLOY_DIR/logs.txt"
319329
- script:
320330
title: Check for cache invocations
321331
inputs:
@@ -436,12 +446,17 @@ workflows:
436446
- content: |-
437447
set -exo pipefail
438448
../bitrise-build-cache-cli activate gradle -d --cache
449+
- script:
450+
title: Print ~/.init.d/bitrise-build-cache.init.gradle.kts
451+
inputs:
452+
- content: |-
453+
cat ~/.gradle/init.d/bitrise-build-cache.init.gradle.kts
439454
- script:
440455
title: Create local configuration cache
441456
inputs:
442457
- content: |-
443458
set -exo pipefail
444-
./gradlew debug --configuration-cache --dry-run
459+
./gradlew debug --configuration-cache --dry-run --info --stacktrace
445460
- script:
446461
title: Save configuration cache
447462
inputs:
@@ -466,7 +481,7 @@ workflows:
466481
inputs:
467482
- content: |-
468483
set -exo pipefail
469-
(./gradlew debug --configuration-cache 2>&1) | tee "$BITRISE_DEPLOY_DIR/logs.txt"
484+
(./gradlew debug --configuration-cache --info --stacktrace 2>&1) | tee "$BITRISE_DEPLOY_DIR/logs.txt"
470485
- script:
471486
title: Check for cache invocations
472487
inputs:
@@ -495,12 +510,17 @@ workflows:
495510
- content: |-
496511
set -exo pipefail
497512
../bitrise-build-cache-cli activate gradle -d --cache
513+
- script:
514+
title: Print ~/.init.d/bitrise-build-cache.init.gradle.kts
515+
inputs:
516+
- content: |-
517+
cat ~/.gradle/init.d/bitrise-build-cache.init.gradle.kts
498518
- script:
499519
title: Create local configuration cache
500520
inputs:
501521
- content: |-
502522
set -exo pipefail
503-
./gradlew debug --configuration-cache --dry-run
523+
./gradlew debug --configuration-cache --dry-run --info --stacktrace
504524
- script:
505525
title: Save configuration cache
506526
inputs:
@@ -525,7 +545,7 @@ workflows:
525545
inputs:
526546
- content: |-
527547
set -exo pipefail
528-
(./gradlew debug --configuration-cache 2>&1) | tee "$BITRISE_DEPLOY_DIR/logs.txt"
548+
(./gradlew debug --configuration-cache --info --stacktrace 2>&1) | tee "$BITRISE_DEPLOY_DIR/logs.txt"
529549
- script:
530550
title: Check for cache invocations
531551
inputs:

cmd/asset/verification-metadata.xml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -188,36 +188,36 @@
188188
<sha256 value="b1c2199e1c0cc969ef61cbbe4af2ecaf9b06411bdde01cbaf6fc9134dfe04e8a" origin="Generated by Gradle"/>
189189
</artifact>
190190
</component>
191-
<component group="io.bitrise.gradle" name="common" version="1.0.1">
192-
<artifact name="common-1.0.1.jar">
193-
<sha256 value="074191e545ddb41a24a35e8c414963bae14a6f4302b7ca6f402432ef5da47d68" origin="Generated by Gradle"/>
191+
<component group="io.bitrise.gradle" name="common" version="1.0.2">
192+
<artifact name="common-1.0.2.jar">
193+
<sha256 value="61511477843279443424a959923d17ce4519b5ef978b7e004ea07a36f1601388" origin="Generated by Gradle"/>
194194
</artifact>
195-
<artifact name="common-1.0.1.module">
196-
<sha256 value="dc1fa325d51b1718b5e5d5652205cf2165d1fa5ca63c07202b77d9e4f804e1fd" origin="Generated by Gradle"/>
195+
<artifact name="common-1.0.2.module">
196+
<sha256 value="54e52ea27576dbeb0f4d82953b81a7039ed0bfed2c58ea5bdfc1436a56e7f322" origin="Generated by Gradle"/>
197197
</artifact>
198198
</component>
199-
<component group="io.bitrise.gradle" name="gradle-analytics" version="2.1.28">
200-
<artifact name="gradle-analytics-2.1.28.jar">
201-
<sha256 value="830d4a154897613b081f43037d717201f7be6852b47394400c1416bec23c169d" origin="Generated by Gradle"/>
199+
<component group="io.bitrise.gradle" name="gradle-analytics" version="2.1.30">
200+
<artifact name="gradle-analytics-2.1.30.jar">
201+
<sha256 value="2167bc0040406aec66bfd56a0de2871fd2c62ee3ebe93e359f92bf15c5049cbc" origin="Generated by Gradle"/>
202202
</artifact>
203-
<artifact name="gradle-analytics-2.1.28.module">
204-
<sha256 value="6d48d7c30358d12a00f5b55710f7dc578e1b4fe883b49f02ea0c7373a63e3c99" origin="Generated by Gradle"/>
203+
<artifact name="gradle-analytics-2.1.30.module">
204+
<sha256 value="d5f0e45f8c2d6277fbe4ca69e6a1909f7614494d3493ff8e3a70385a6cb505b4" origin="Generated by Gradle"/>
205205
</artifact>
206206
</component>
207-
<component group="io.bitrise.gradle" name="remote-cache" version="1.2.19">
208-
<artifact name="remote-cache-1.2.19.jar">
209-
<sha256 value="4b8407f43dab9fbfc68c0c917badf98bdcb1962f5d3f54e76a1ad5696e740bec" origin="Generated by Gradle"/>
207+
<component group="io.bitrise.gradle" name="remote-cache" version="1.2.20">
208+
<artifact name="remote-cache-1.2.20.jar">
209+
<sha256 value="29b4eac1c3c8b4574d4b9b7222ea5b3047ed92f50e01129ffb034a01143cdc2a" origin="Generated by Gradle"/>
210210
</artifact>
211-
<artifact name="remote-cache-1.2.19.module">
212-
<sha256 value="32f427f926c1e849178e168d8a0354dc083f1627bf89e2b940768e20998b46b2" origin="Generated by Gradle"/>
211+
<artifact name="remote-cache-1.2.20.module">
212+
<sha256 value="c8c493966e4e03dd52da7ebb8893ffd0c9b2759181c68be8fe6e4f917324c4ac" origin="Generated by Gradle"/>
213213
</artifact>
214214
</component>
215-
<component group="io.bitrise.gradle" name="test-distribution" version="2.1.24">
216-
<artifact name="test-distribution-2.1.24.jar">
217-
<sha256 value="bf69e12954410e99e3be6141103cbaaeb0c1e919b417df9e9e27aee2620ef630" origin="Generated by Gradle"/>
215+
<component group="io.bitrise.gradle" name="test-distribution" version="2.1.25">
216+
<artifact name="test-distribution-2.1.25.jar">
217+
<sha256 value="7a6ce5f54c49ade23a121c3646182d6d8e96e6273891d1e50dcfd91b92925988" origin="Generated by Gradle"/>
218218
</artifact>
219-
<artifact name="test-distribution-2.1.24.module">
220-
<sha256 value="10322dd7bd936d125b8f308a30810db140138f8088606fd8406f274f79faa32a" origin="Generated by Gradle"/>
219+
<artifact name="test-distribution-2.1.25.module">
220+
<sha256 value="a5077a2f077c04cc030ee583395e9cc2a8585a18a7ef93ae114e0301036012cb" origin="Generated by Gradle"/>
221221
</artifact>
222222
</component>
223223
<component group="io.grpc" name="grpc-api" version="1.65.0">

internal/config/gradle/activate_for_gradle_params.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ func (params ActivateGradleParams) commonTemplateInventory(
124124
Debug: isDebug,
125125
AppSlug: cacheConfig.BitriseAppID,
126126
CIProvider: cacheConfig.CIProvider,
127+
Version: consts.GradleCommonPluginDepVersion,
127128
}, nil
128129
}
129130

internal/config/gradle/activate_for_gradle_params_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ func Test_activateGradleParams(t *testing.T) {
7272
want: TemplateInventory{
7373
Common: PluginCommonTemplateInventory{
7474
AuthToken: "WorkspaceIDValue:AuthTokenValue",
75+
Version: consts.GradleCommonPluginDepVersion,
7576
},
7677
Cache: CacheTemplateInventory{
7778
Usage: UsageLevelNone,
@@ -107,6 +108,7 @@ func Test_activateGradleParams(t *testing.T) {
107108
want: TemplateInventory{
108109
Common: PluginCommonTemplateInventory{
109110
AuthToken: "WorkspaceIDValue:AuthTokenValue",
111+
Version: consts.GradleCommonPluginDepVersion,
110112
},
111113
Cache: CacheTemplateInventory{
112114
Usage: UsageLevelDependency,
@@ -146,6 +148,7 @@ func Test_activateGradleParams(t *testing.T) {
146148
want: TemplateInventory{
147149
Common: PluginCommonTemplateInventory{
148150
AuthToken: "WorkspaceIDValue:AuthTokenValue",
151+
Version: consts.GradleCommonPluginDepVersion,
149152
},
150153
Cache: CacheTemplateInventory{
151154
Usage: UsageLevelEnabled,
@@ -205,6 +208,7 @@ func Test_activateGradleParams(t *testing.T) {
205208
want: TemplateInventory{
206209
Common: PluginCommonTemplateInventory{
207210
AuthToken: "WorkspaceIDValue:AuthTokenValue",
211+
Version: consts.GradleCommonPluginDepVersion,
208212
},
209213
Cache: CacheTemplateInventory{
210214
Usage: UsageLevelNone,
@@ -246,6 +250,7 @@ func Test_activateGradleParams(t *testing.T) {
246250
AuthToken: "WorkspaceIDValue:AuthTokenValue",
247251
AppSlug: "AppSlugValue",
248252
CIProvider: "bitrise",
253+
Version: consts.GradleCommonPluginDepVersion,
249254
},
250255
Cache: CacheTemplateInventory{
251256
Usage: UsageLevelNone,
@@ -311,6 +316,7 @@ func Test_activateGradleParams(t *testing.T) {
311316
Debug: true,
312317
AppSlug: "AppSlugValue",
313318
CIProvider: "bitrise",
319+
Version: consts.GradleCommonPluginDepVersion,
314320
},
315321
Cache: CacheTemplateInventory{
316322
Usage: UsageLevelNone,

internal/config/gradle/gradle_init_template_inventory.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ type PluginCommonTemplateInventory struct {
3939
Debug bool
4040
AppSlug string
4141
CIProvider string
42+
Version string
4243
}
4344

4445
type TemplateInventory struct {

internal/config/gradle/gradleconfig_generate_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ func Test_GenerateInitGradle(t *testing.T) {
2222
Debug: true,
2323
AppSlug: "AppSlugValue",
2424
CIProvider: "CIProviderValue",
25+
Version: "CommonVersionValue",
2526
},
2627
Cache: CacheTemplateInventory{
2728
Usage: UsageLevelNone,
@@ -44,6 +45,7 @@ func Test_GenerateInitGradle(t *testing.T) {
4445
Debug: true,
4546
AppSlug: "AppSlugValue",
4647
CIProvider: "CIProviderValue",
48+
Version: "CommonVersionValue",
4749
},
4850
Cache: CacheTemplateInventory{
4951
Usage: UsageLevelDependency,
@@ -69,6 +71,7 @@ func Test_GenerateInitGradle(t *testing.T) {
6971
Debug: true,
7072
AppSlug: "AppSlugValue",
7173
CIProvider: "CIProviderValue",
74+
Version: "CommonVersionValue",
7275
},
7376
Cache: CacheTemplateInventory{
7477
Usage: UsageLevelEnabled,
@@ -115,10 +118,6 @@ import io.bitrise.gradle.cache.BitriseBuildCacheServiceFactory`
115118

116119
const expectedRepositories = ` repositories {
117120
mavenLocal()
118-
maven {
119-
name = "artifactRegistry"
120-
url = uri("https://us-maven.pkg.dev/ip-build-cache-prod/build-cache-maven")
121-
}
122121
maven {
123122
name = "gradlePlugins"
124123
url = uri("https://plugins.gradle.org/m2/")
@@ -132,6 +131,7 @@ const expectedRepositories = ` repositories {
132131
}`
133132

134133
const expectedDependencies = ` dependencies {
134+
classpath("io.bitrise.gradle:common:CommonVersionValue")
135135
classpath("io.bitrise.gradle:gradle-analytics:AnalyticsVersionValue")
136136
classpath("io.bitrise.gradle:remote-cache:CacheVersionValue")
137137
classpath("io.bitrise.gradle:test-distribution:TestDistroVersionValue")

internal/config/gradle/initd.gradle.kts.gotemplate

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ import io.bitrise.gradle.cache.BitriseBuildCacheServiceFactory
55
initscript {
66
repositories {
77
mavenLocal()
8-
maven {
9-
name = "artifactRegistry"
10-
url = uri("https://us-maven.pkg.dev/ip-build-cache-prod/build-cache-maven")
11-
}
128
maven {
139
name = "gradlePlugins"
1410
url = uri("https://plugins.gradle.org/m2/")
@@ -22,6 +18,7 @@ initscript {
2218
}
2319
{{- if hasDependencies . }}
2420
dependencies {
21+
classpath("io.bitrise.gradle:common:{{ .Common.Version }}")
2522
{{- if eq .Analytics.Usage "dependency" "enabled" }}
2623
classpath("io.bitrise.gradle:gradle-analytics:{{ .Analytics.Version }}")
2724
{{- end }}
@@ -92,4 +89,4 @@ rootProject {
9289

9390
apply<io.bitrise.gradle.rbe.RBEPlugin>()
9491
}
95-
{{- end -}}
92+
{{- end -}}

internal/consts/consts.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ const (
2626
AnalyticsServiceEndpoint = "https://xcode-analytics.services.bitrise.io"
2727

2828
// Gradle Remote Build Cache related consts
29-
GradleRemoteBuildCachePluginDepVersion = "1.2.19"
29+
GradleRemoteBuildCachePluginDepVersion = "1.2.20"
3030

3131
// Gradle Analytics related consts
32-
GradleAnalyticsPluginDepVersion = "2.1.28"
32+
GradleAnalyticsPluginDepVersion = "2.1.30"
3333
GradleAnalyticsEndpoint = "gradle-analytics.services.bitrise.io"
3434
GradleAnalyticsHTTPEndpoint = "https://gradle-sink.services.bitrise.io"
3535
GradleAnalyticsPort = 443
3636

3737
// Gradle Common Plugin version
38-
GradleCommonPluginDepVersion = "1.0.1"
38+
GradleCommonPluginDepVersion = "1.0.2"
3939

4040
// Gradle Test Distribution Plugin version
41-
GradleTestDistributionPluginDepVersion = "2.1.24"
41+
GradleTestDistributionPluginDepVersion = "2.1.25"
4242
GradleTestDistributionEndpoint = "grpcs://remote-execution-ord.services.bitrise.io"
4343
GradleTestDistributionKvEndpoint = "grpcs://build-cache-api-ord.services.bitrise.io"
4444
GradleTestDistributionPort = 443

internal/gradle/plugin_cacher.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ func (pluginCacher PluginCacher) fetchFromCache(
9292
file PluginFile,
9393
logger log.Logger,
9494
) (bool, error) {
95+
logger.Debugf("Fetching " + file.name() + " from kv cache with key: " + file.key())
9596
downloaded, err := kvClient.DownloadFile(
9697
ctx,
9798
filepath.Join(file.absoluteDirPath(logger), file.name()),

internal/gradle/plugin_downloader.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ type PluginDownloader struct {
1616

1717
func (downloader PluginDownloader) Download(file PluginFile) (string, error) {
1818
artifactRepositories := []string{
19-
"https://us-maven.pkg.dev/ip-build-cache-prod/build-cache-maven",
2019
"https://plugins.gradle.org/m2/",
2120
"https://repo.maven.apache.org/maven2",
2221
"https://repo1.maven.org/maven2",

0 commit comments

Comments
 (0)