Skip to content

Commit dc313a4

Browse files
feat: ACI-2926 Generate config cache compatible config
1 parent e95ef24 commit dc313a4

File tree

3 files changed

+13
-20
lines changed

3 files changed

+13
-20
lines changed

internal/config/gradle/gradleconfig_test.go

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ func TestGenerateInitGradle(t *testing.T) {
5353
CIProvider: "BestCI",
5454
RepoURL: "https://github.com/some/repo",
5555
// Bitrise CI specific
56-
BitriseAppID: "BitriseAppID1",
57-
BitriseBuildID: "BitriseBuildID1",
58-
BitriseWorkflowName: "BitriseWorkflowName1",
56+
BitriseAppID: "BitriseAppID1",
5957
},
6058
},
6159
want: expectedInitScriptWithoutMetrics,
@@ -76,9 +74,7 @@ func TestGenerateInitGradle(t *testing.T) {
7674
CIProvider: "BestCI",
7775
RepoURL: "https://github.com/some/repo",
7876
// Bitrise CI specific
79-
BitriseAppID: "BitriseAppID1",
80-
BitriseBuildID: "BitriseBuildID1",
81-
BitriseWorkflowName: "BitriseWorkflowName1",
77+
BitriseAppID: "BitriseAppID1",
8278
},
8379
},
8480
want: expectedInitScriptWithMetrics,
@@ -155,7 +151,7 @@ initscript {
155151
maven(url="https://jitpack.io")
156152
}
157153
dependencies {
158-
classpath("io.bitrise.gradle:remote-cache:1.2.8")
154+
classpath("io.bitrise.gradle:remote-cache:1.2.9")
159155
classpath("io.bitrise.gradle:gradle-analytics:2.1.7")
160156
}
161157
}
@@ -174,6 +170,7 @@ settingsEvaluated {
174170
isPush = true
175171
debug = true
176172
blobValidationLevel = "warning"
173+
collectMetadata = false
177174
}
178175
}
179176
}
@@ -193,8 +190,6 @@ rootProject {
193190
194191
bitrise {
195192
appSlug.set("BitriseAppID1")
196-
buildSlug.set("BitriseBuildID1")
197-
workflowName.set("BitriseWorkflowName1")
198193
}
199194
}
200195
}
@@ -211,7 +206,7 @@ initscript {
211206
maven(url="https://jitpack.io")
212207
}
213208
dependencies {
214-
classpath("io.bitrise.gradle:remote-cache:1.2.8")
209+
classpath("io.bitrise.gradle:remote-cache:1.2.9")
215210
classpath("io.bitrise.gradle:gradle-analytics:2.1.7")
216211
}
217212
}
@@ -230,6 +225,7 @@ settingsEvaluated {
230225
isPush = true
231226
debug = true
232227
blobValidationLevel = "warning"
228+
collectMetadata = false
233229
}
234230
}
235231
}
@@ -264,7 +260,7 @@ initscript {
264260
maven(url="https://jitpack.io")
265261
}
266262
dependencies {
267-
classpath("io.bitrise.gradle:remote-cache:1.2.8")
263+
classpath("io.bitrise.gradle:remote-cache:1.2.9")
268264
}
269265
}
270266
@@ -298,7 +294,7 @@ initscript {
298294
maven(url="https://jitpack.io")
299295
}
300296
dependencies {
301-
classpath("io.bitrise.gradle:remote-cache:1.2.8")
297+
classpath("io.bitrise.gradle:remote-cache:1.2.9")
302298
}
303299
}
304300
@@ -332,7 +328,7 @@ initscript {
332328
maven(url="https://jitpack.io")
333329
}
334330
dependencies {
335-
classpath("io.bitrise.gradle:remote-cache:1.2.8")
331+
classpath("io.bitrise.gradle:remote-cache:1.2.9")
336332
}
337333
}
338334

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ settingsEvaluated {
3030
isPush = {{ .IsPushEnabled }}
3131
debug = {{ .IsDebugEnabled }}
3232
blobValidationLevel = "{{ .ValidationLevel }}"
33+
{{- if .IsAnalyticsEnabled }}
34+
collectMetadata = false
35+
{{- end }}
3336
}
3437
}
3538
}
@@ -53,12 +56,6 @@ rootProject {
5356
{{- if .CacheConfigMetadata.BitriseAppID }}
5457
appSlug.set("{{ .CacheConfigMetadata.BitriseAppID }}")
5558
{{- end }}
56-
{{- if .CacheConfigMetadata.BitriseBuildID }}
57-
buildSlug.set("{{ .CacheConfigMetadata.BitriseBuildID }}")
58-
{{- end }}
59-
{{- if .CacheConfigMetadata.BitriseWorkflowName }}
60-
workflowName.set("{{ .CacheConfigMetadata.BitriseWorkflowName }}")
61-
{{- end }}
6259
}
6360
}
6461
}

internal/consts/consts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const (
1010
AnalyticsServiceEndpoint = "https://xcode-analytics.services.bitrise.io"
1111

1212
// Gradle Remote Build Cache related consts
13-
GradleRemoteBuildCachePluginDepVersion = "1.2.8"
13+
GradleRemoteBuildCachePluginDepVersion = "1.2.9"
1414

1515
// Gradle Analytics related consts
1616
GradleAnalyticsPluginDepVersion = "2.1.7"

0 commit comments

Comments
 (0)