diff options
| author | Menny Even Danan <menny@evendanan.net> | 2020-03-12 15:11:04 +0000 |
|---|---|---|
| committer | Menny Even Danan <menny@evendanan.net> | 2020-03-12 15:11:04 +0000 |
| commit | 23c71ce2d53573d4804849b3dcfb9b5148548052 (patch) | |
| tree | 34cb012596d9413b0da477db76415c27f8ebb1e4 /gradle/apk_module.gradle | |
| parent | 3f10dc438e55e10c78dc8361a3953f9ce01f02c7 (diff) | |
| download | AnySoftKeyboard-23c71ce2d53573d4804849b3dcfb9b5148548052.tar.gz AnySoftKeyboard-23c71ce2d53573d4804849b3dcfb9b5148548052.tar.bz2 | |
Ensuring alpha release-notes is used in other channels publish
Diffstat (limited to 'gradle/apk_module.gradle')
| -rw-r--r-- | gradle/apk_module.gradle | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gradle/apk_module.gradle b/gradle/apk_module.gradle index e0f944bc7..467f15a45 100644 --- a/gradle/apk_module.gradle +++ b/gradle/apk_module.gradle @@ -1,3 +1,6 @@ +import java.nio.file.Files +import java.nio.file.StandardCopyOption + apply plugin: 'com.android.application' static <T> T getExtValue(Project proj, String key, T defaultValue) { @@ -90,10 +93,19 @@ if (project.ext.shouldBePublished) { } serviceAccountEmail = System.getenv().getOrDefault('PUBLISH_APK_SERVICE_ACCOUNT_EMAIL', 'dummy@example.com') serviceAccountCredentials = file('/tmp/apk_upload_key.p12') + + if ('alpha' != track) { + //to keep things simple, we will only specify release-notes in the alpha + //channel + Files.copy( + project.file('src/main/play/release-notes/en-US/alpha.txt').toPath(), + project.file("/src/main/play/release-notes/en-US/${System.getProperty('deployChannel', 'alpha')}.txt").toPath(), + StandardCopyOption.REPLACE_EXISTING) + } } //verifying release-notes file - File playStoreWhatsNewFile = file("${project.projectDir}/src/main/play/release-notes/en-US/${System.getProperty('deployChannel', 'alpha')}.txt") + File playStoreWhatsNewFile = file("${project.projectDir}/src/main/play/release-notes/en-US/alpha.txt") if (!playStoreWhatsNewFile.exists()) { throw new FileNotFoundException("Can not find whatsnew file for Play-Store upload at ${playStoreWhatsNewFile}!") } |
