Skip to content

Commit 12afb9d

Browse files
authored
Merge pull request #21 from androidx/small-fixups
Fix readme, update version and add missing registerBuildCacheService call
2 parents ce93ff9 + aed600f commit 12afb9d

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ In your `settings.gradle.kts` file add the following
88

99
```kotlin
1010
plugins {
11-
id("androidx.build.gradle.gcpbuildcache") version "1.0.0-alpha02"
11+
id("androidx.build.gradle.gcpbuildcache") version "1.0.0-alpha03"
1212
}
1313

1414
import androidx.build.gradle.gcpbuildcache.GcpBuildCache
15+
import androidx.build.gradle.gcpbuildcache.GcpBuildCacheServiceFactory
1516
import androidx.build.gradle.gcpbuildcache.ExportedKeyGcpCredentials
1617

1718
buildCache {
19+
registerBuildCacheService(GcpBuildCache::class, GcpBuildCacheServiceFactory::class)
1820
remote(GcpBuildCache::class) {
1921
projectId = "foo"
2022
bucketName = "bar"
@@ -34,13 +36,15 @@ If you are using Groovy, then you should do the following:
3436

3537
```groovy
3638
plugins {
37-
id("androidx.build.gradle.gcpbuildcache") version "1.0.0-alpha02"
39+
id("androidx.build.gradle.gcpbuildcache") version "1.0.0-alpha03"
3840
}
3941
4042
import androidx.build.gradle.gcpbuildcache.GcpBuildCache
43+
import androidx.build.gradle.gcpbuildcache.GcpBuildCacheServiceFactory
4144
import androidx.build.gradle.gcpbuildcache.ExportedKeyGcpCredentials
4245
4346
buildCache {
47+
registerBuildCacheService(GcpBuildCache, GcpBuildCacheServiceFactory)
4448
remote(GcpBuildCache) {
4549
projectId = "projectName"
4650
bucketName = "storageBucketName"

gcpbuildcache/src/main/kotlin/androidx/build/gradle/gcpbuildcache/GcpBuildCacheServiceFactory.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ package androidx.build.gradle.gcpbuildcache
2020
import org.gradle.caching.BuildCacheService
2121
import org.gradle.caching.BuildCacheServiceFactory
2222

23-
internal class GcpBuildCacheServiceFactory : BuildCacheServiceFactory<GcpBuildCache> {
23+
/**
24+
* Factory used by Gradle to create GcpBuildCache instances.
25+
*/
26+
class GcpBuildCacheServiceFactory : BuildCacheServiceFactory<GcpBuildCache> {
2427
override fun createBuildCacheService(
2528
buildCache: GcpBuildCache,
2629
describer: BuildCacheServiceFactory.Describer,

0 commit comments

Comments
 (0)