Skip to content

Commit

Permalink
Release v1.7.0-rc.1 (10700)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunkFood02 committed Dec 26, 2022
1 parent 1a7b8a5 commit fc648e1
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 9 deletions.
52 changes: 43 additions & 9 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,45 @@ plugins {
}
apply(plugin = "dagger.hilt.android.plugin")

val versionMajor = 1
val versionMinor = 7
val versionPatch = 0
val versionBuild = 5
val isStable = false
enum class VersionVariants {
STABLE, BETA, RELEASE_CANDIDATE
}

sealed class Version(
open val versionMajor: Int,
val versionMinor: Int,
val versionPatch: Int,
val versionBuild: Int = 0
) {
abstract fun toVersionName(): String
class Beta(versionMajor: Int, versionMinor: Int, versionPatch: Int, versionBuild: Int) :
Version(versionMajor, versionMinor, versionPatch, versionBuild) {
override fun toVersionName(): String =
"${versionMajor}.${versionMinor}.${versionPatch}-beta.$versionBuild"
}
class Stable(versionMajor: Int, versionMinor: Int, versionPatch: Int) :
Version(versionMajor, versionMinor, versionPatch) {
override fun toVersionName(): String =
"${versionMajor}.${versionMinor}.${versionPatch}"
}
class ReleaseCandidate(
versionMajor: Int,
versionMinor: Int,
versionPatch: Int,
versionBuild: Int
) :
Version(versionMajor, versionMinor, versionPatch, versionBuild) {
override fun toVersionName(): String =
"${versionMajor}.${versionMinor}.${versionPatch}-rc.$versionBuild"
}
}

val currentVersion:Version = Version.ReleaseCandidate(
versionMajor = 1,
versionMinor = 7,
versionPatch = 0,
versionBuild = 1
)

val keystorePropertiesFile = rootProject.file("keystore.properties")

Expand All @@ -41,10 +75,10 @@ android {
minSdk = 23
targetSdk = 33
versionCode = 10700
versionName = StringBuilder("${versionMajor}.${versionMinor}.${versionPatch}").apply {
if (!isStable) append("-beta.${versionBuild}")
if (!splitApks) append("-(F-Droid)")
}.toString()
versionName = currentVersion.toVersionName().run {
if (!splitApks) "$this-(F-Droid)"
else this
}
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
kapt {
arguments {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,5 @@
<string name="custom_command_enabled_hint">部分选项在自定义命令模式下不可用</string>
<string name="how_does_it_work">使用说明</string>
<string name="cookies_usage_msg">从某些站点下载需要帐户验证信息。 点击“生成新的 Cookies”,输入网站的 URL,然后在浏览器页面使用你的账户登录,应用将会自动生成并在下载时输入认证信息。</string>
<string name="telegram_channel">Telegram 频道</string>
</resources>

0 comments on commit fc648e1

Please sign in to comment.