Compare commits
3 commits
d872bdf012
...
fbbf5ae1fa
Author | SHA1 | Date | |
---|---|---|---|
fbbf5ae1fa | |||
abafba225f | |||
3e1fbb6acd |
4 changed files with 25 additions and 9 deletions
|
@ -21,6 +21,7 @@ try {
|
||||||
keystoreProperties["keyPassword"] = ""
|
keystoreProperties["keyPassword"] = ""
|
||||||
keystoreProperties["storeFile"] = File.createTempFile("temp", ".tmp").absolutePath
|
keystoreProperties["storeFile"] = File.createTempFile("temp", ".tmp").absolutePath
|
||||||
keystoreProperties["storePassword"] = ""
|
keystoreProperties["storePassword"] = ""
|
||||||
|
keystoreProperties["publishCredentialsFile"] = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -108,6 +109,7 @@ play {
|
||||||
enabled.set(false)
|
enabled.set(false)
|
||||||
track.set("production")
|
track.set("production")
|
||||||
defaultToAppBundles.set(true)
|
defaultToAppBundles.set(true)
|
||||||
|
serviceAccountCredentials.set(file((keystoreProperties["publishCredentialsFile"] as? String).orEmpty()))
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- Fix crash on markdown preview
|
- Fix crash on markdown preview
|
||||||
- Persist preference for Lock Swiping
|
|
||||||
- Enable gestures on nav drawer when open
|
|
||||||
- Close navigation drawer on back press
|
- Close navigation drawer on back press
|
||||||
- Various dependency updates
|
- Enable gestures on nav drawer when open
|
||||||
|
- Persist preference for Lock Swiping
|
||||||
|
- Update dependencies
|
||||||
|
- Other minor bug fixes and performance enhancements
|
||||||
|
|
|
@ -2,25 +2,37 @@ package com.wbrawner.releasehelper
|
||||||
|
|
||||||
import org.gradle.api.DefaultTask
|
import org.gradle.api.DefaultTask
|
||||||
import org.gradle.api.file.RegularFileProperty
|
import org.gradle.api.file.RegularFileProperty
|
||||||
|
import org.gradle.api.internal.provider.Providers
|
||||||
import org.gradle.api.model.ObjectFactory
|
import org.gradle.api.model.ObjectFactory
|
||||||
|
import org.gradle.api.provider.Property
|
||||||
|
import org.gradle.api.provider.ProviderFactory
|
||||||
|
import org.gradle.api.tasks.Input
|
||||||
import org.gradle.api.tasks.OutputFile
|
import org.gradle.api.tasks.OutputFile
|
||||||
import org.gradle.api.tasks.TaskAction
|
import org.gradle.api.tasks.TaskAction
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
private const val CHANGELOG_PATH = "src/play/play/release-notes/en-US/default.txt"
|
private const val CHANGELOG_PATH = "src/play/play/release-notes/en-US/production.txt"
|
||||||
|
|
||||||
abstract class ChangelogTask @Inject constructor(objectFactory: ObjectFactory) : DefaultTask() {
|
abstract class ChangelogTask @Inject constructor(
|
||||||
|
objectFactory: ObjectFactory,
|
||||||
|
providers: ProviderFactory,
|
||||||
|
) : DefaultTask() {
|
||||||
@get:OutputFile
|
@get:OutputFile
|
||||||
val changelogFile: RegularFileProperty = objectFactory.fileProperty()
|
val changelogFile: RegularFileProperty = objectFactory.fileProperty()
|
||||||
|
|
||||||
|
@get:Input
|
||||||
|
@Suppress("UnstableApiUsage")
|
||||||
|
val latestTag: String = providers.exec {
|
||||||
|
commandLine("git" , "describe", "--tags", "--abbrev=0")
|
||||||
|
}.standardOutput.asText.get()
|
||||||
|
|
||||||
init {
|
init {
|
||||||
changelogFile.set(project.layout.projectDirectory.file(CHANGELOG_PATH))
|
changelogFile.set(project.layout.projectDirectory.file(CHANGELOG_PATH))
|
||||||
}
|
}
|
||||||
|
|
||||||
@TaskAction
|
@TaskAction
|
||||||
fun execute() {
|
fun execute() {
|
||||||
val latestTag = "git describe --tags --abbrev=0".execute()
|
val changelog = "git log --format=\"%B\" ${latestTag.trim()}..".execute()
|
||||||
val changelog = "git log --format=\"%B\" ${latestTag.first().trim()}..".execute()
|
|
||||||
logger.info("Latest tag: $latestTag")
|
logger.info("Latest tag: $latestTag")
|
||||||
logger.info("Changelog: ${changelog.joinToString("\n")}")
|
logger.info("Changelog: ${changelog.joinToString("\n")}")
|
||||||
changelogFile.get().asFile.writer().use { writer ->
|
changelogFile.get().asFile.writer().use { writer ->
|
||||||
|
@ -36,4 +48,4 @@ abstract class ChangelogTask @Inject constructor(objectFactory: ObjectFactory) :
|
||||||
.start()
|
.start()
|
||||||
.inputReader()
|
.inputReader()
|
||||||
.readLines()
|
.readLines()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
storePassword=
|
storePassword=
|
||||||
keyPassword=
|
keyPassword=
|
||||||
keyAlias=
|
keyAlias=
|
||||||
storeFile=
|
storeFile=
|
||||||
|
publishCredentialsFile=
|
Loading…
Reference in a new issue