39 // PLAY_STORE_FROM_TRACK: track from which to promote a build, default to internal but can be set to alpha, beta or production |
39 // PLAY_STORE_FROM_TRACK: track from which to promote a build, default to internal but can be set to alpha, beta or production |
40 |
40 |
41 internal fun Project.configureAndroidPlayStorePublisher(): Unit { |
41 internal fun Project.configureAndroidPlayStorePublisher(): Unit { |
42 apply(plugin = "com.github.triplet.play") |
42 apply(plugin = "com.github.triplet.play") |
43 configure<PlayPublisherExtension> { |
43 configure<PlayPublisherExtension> { |
44 defaultToAppBundles = true |
44 defaultToAppBundles.set(true) |
45 serviceAccountCredentials = file(properties["PLAY_STORE_JSON_KEY_FILE"]!!) |
45 track.set(properties.getOrDefault("PLAY_STORE_TRACK", "internal") as String) |
46 track = properties.getOrDefault("PLAY_STORE_TRACK", "internal") as String |
46 fromTrack.set(properties.getOrDefault("PLAY_STORE_FROM_TRACK", "internal") as String) |
47 fromTrack = properties.getOrDefault("PLAY_STORE_FROM_TRACK", "internal") as String |
47 serviceAccountCredentials.set(file(properties["PLAY_STORE_JSON_KEY_FILE"]!!)) |
48 } |
48 } |
49 |
49 |
50 val android = the<AppExtension>() as ExtensionAware |
50 val android = the<AppExtension>() as ExtensionAware |
51 |
51 |
52 tasks.apply { |
52 tasks.apply { |
53 register("publishToGooglePlayStore") { |
53 register("publishToGooglePlayStore") { |
54 group = "Continuous Delivery" |
54 group = "Continuous Delivery" |
55 description = "Publish project to Google play store" |
55 description = "Publish project to Google play store" |
56 dependsOn(named("publish")) |
56 dependsOn(named("publishApps")) |
57 } |
57 } |
58 |
58 |
59 // only there for consistent naming scheme |
59 // only there for consistent naming scheme |
60 register("promoteOnGooglePlayStore") { |
60 register("promoteOnGooglePlayStore") { |
61 group = "Continuous Delivery" |
61 group = "Continuous Delivery" |