diff --git a/plugin-build/plugin/src/main/java/ru/kode/android/build/publish/plugin/task/play/track/TrackManager.kt b/plugin-build/plugin/src/main/java/ru/kode/android/build/publish/plugin/task/play/track/TrackManager.kt index 2384aef..50a8207 100644 --- a/plugin-build/plugin/src/main/java/ru/kode/android/build/publish/plugin/task/play/track/TrackManager.kt +++ b/plugin-build/plugin/src/main/java/ru/kode/android/build/publish/plugin/task/play/track/TrackManager.kt @@ -13,7 +13,7 @@ internal interface TrackManager { data class BaseConfig( val releaseStatus: ReleaseStatus? = null, - val userFraction: Double?, + val userFraction: Double? = null, val updatePriority: Int?, val releaseNotes: Map? = emptyMap(), val retainableArtifacts: List? = null, diff --git a/plugin-build/plugin/src/main/java/ru/kode/android/build/publish/plugin/task/play/work/PlayUploadWork.kt b/plugin-build/plugin/src/main/java/ru/kode/android/build/publish/plugin/task/play/work/PlayUploadWork.kt index f2a2bae..0e3a07d 100644 --- a/plugin-build/plugin/src/main/java/ru/kode/android/build/publish/plugin/task/play/work/PlayUploadWork.kt +++ b/plugin-build/plugin/src/main/java/ru/kode/android/build/publish/plugin/task/play/work/PlayUploadWork.kt @@ -37,7 +37,7 @@ abstract class PlayUploadWork : WorkAction { publisher = createPublisher(parameters.apiToken.asFile.get().inputStream()), appId = parameters.appId.get(), ) - logger.info("Step 1/3: Requesting track edit...") + logger.info("Step 1/4: Requesting track edit...") val editId = when (val result = publisher.insertEdit()) { is EditResponse.Success -> result.id @@ -59,7 +59,7 @@ abstract class PlayUploadWork : WorkAction { val trackManager = DefaultTrackManager(publisher, editId) val editManager = DefaultEditManager(publisher, trackManager, editId) - logger.info("Step 2/3: Upload bundle for $editId") + logger.info("Step 2/4: Upload bundle for $editId") val versionCode = editManager.uploadBundle(file, ResolutionStrategy.IGNORE) @@ -68,7 +68,7 @@ abstract class PlayUploadWork : WorkAction { return } - logger.info("Step 3/3: Pushing $releaseName to $track at P=$priority V=$versionCode") + logger.info("Step 3/4: Pushing $releaseName to $track at P=$priority V=$versionCode") trackManager.update( config = @@ -77,12 +77,16 @@ abstract class PlayUploadWork : WorkAction { versionCodes = listOf(versionCode), didPreviousBuildSkipCommit = false, TrackManager.BaseConfig( - userFraction = parameters.versionCode.orNull ?: 0.1, updatePriority = priority, releaseName = parameters.releaseName.get(), ), ), ) - logger.info("Step 3/3: Bundle upload successful") + + logger.info("Step 3/4: Commit $editId") + + publisher.commitEdit(editId) + + logger.info("Step 4/4: Bundle upload successful") } }