Skip to content

Commit

Permalink
feat: Update beta track
Browse files Browse the repository at this point in the history
Signed-off-by: Hu Shenghao <[email protected]>
  • Loading branch information
hushenghao committed Oct 10, 2024
1 parent b321e48 commit b859a0b
Show file tree
Hide file tree
Showing 23 changed files with 156 additions and 97 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Beta CI
name: Build Pgyer apk

on:
push:
Expand Down Expand Up @@ -51,4 +51,4 @@ jobs:
run: |
bundle install
bundle exec fastlane install_plugins
bundle exec fastlane beta
bundle exec fastlane pgyer
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ jobs:
run: |
bundle install
bundle exec fastlane install_plugins
bundle exec fastlane deploy
bundle exec fastlane deploy ref_name:${{ github.ref_name }}
3 changes: 2 additions & 1 deletion .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Changelog

### v3.0.1
### v3.1.0-beta01

- Fix Android 15 Easter Egg add flag crash on Android 8.1 [#384](https://github.com/hushenghao/AndroidEasterEggs/issues/384)
- Add Beta version track
- Fix Android M Easter Egg players color [#387](https://github.com/hushenghao/AndroidEasterEggs/issues/387)
- Upgrade project dependencies

### v3.0.1 (2024-09-26)

- Fix Android 15 Easter Egg add flag crash on Android 8.1 [#384](https://github.com/hushenghao/AndroidEasterEggs/issues/384)
- Upgrade project dependencies

### v3.0.0 (2024-09-18)

- Add Android 15 Easter Egg Landroid
Expand Down
9 changes: 7 additions & 2 deletions CHANGELOG_zh.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# 更新日志

### v3.0.1
### v3.1.0-beta01

- 修复 Android 8.1 系统 Android 15 彩蛋添加旗帜时崩溃 [#384](https://github.com/hushenghao/AndroidEasterEggs/issues/384)
- 添加 Beta 版本渠道
- 修复 Android M 彩蛋玩家的颜色 [#387](https://github.com/hushenghao/AndroidEasterEggs/issues/387)
- 升级项目依赖项

### v3.0.1 (2024-09-26)

- 修复 Android 8.1 系统 Android 15 彩蛋添加旗帜时崩溃 [#384](https://github.com/hushenghao/AndroidEasterEggs/issues/384)
- 升级项目依赖项

### v3.0.0 (2024-09-18)

- 新增 Android 15 彩蛋 Landroid
Expand Down
16 changes: 12 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {

defaultConfig {
applicationId = "com.dede.android_eggs"
versionCode = 48
versionName = "3.0.1"
versionCode = 50
versionName = "3.1.0-beta01"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

resourceConfigurations += listOf(
Expand Down Expand Up @@ -54,8 +54,16 @@ android {
)
signingConfig = config
}
createWith("beta", "release") {
matchingFallbacks += listOf("release", "debug")
}

flavorDimensions += "app"

productFlavors {
create("foss") {
dimension = "app"
}
create("market") {
dimension = "app"
}
}

Expand Down
4 changes: 4 additions & 0 deletions app/src/foss/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="url_beta" translatable="false">https://github.com/hushenghao/AndroidEasterEggs/releases</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fun BuildTypeBubble() {
@Suppress("KotlinConstantConditions")
val bubble = when {
BuildConfig.DEBUG -> "Debug"
BuildConfig.BUILD_TYPE == "beta" -> "Beta"
BuildConfig.FLAVOR == "foss" -> "FOSS"
else -> return
}
Box(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
package com.dede.android_eggs.views.settings.compose.groups

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.requiredSize
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.Download
import androidx.compose.material.icons.rounded.Info
import androidx.compose.material.icons.rounded.Policy
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.em
import com.dede.android_eggs.R
import com.dede.android_eggs.util.CustomTabsBrowser
import com.dede.android_eggs.views.settings.compose.basic.ExpandOptionsPref
Expand All @@ -34,16 +36,16 @@ fun AboutGroup() {
VersionOption()
Option(
leadingIcon = {
Image(
painter = painterResource(R.drawable.ic_pgyer_logo),
contentDescription = stringResource(R.string.label_beta),
modifier = Modifier
.size(24.dp)
.requiredSize(33.dp)
Text(
"β",
fontSize = 5.2.em,
fontStyle = FontStyle.Italic,
fontWeight = FontWeight.SemiBold,
textAlign = TextAlign.Center,
modifier = Modifier.width(24.dp),
)
},
title = stringResource(R.string.label_beta),
desc = stringResource(R.string.url_beta),
trailingContent = imageVectorIconBlock(imageVector = Icons.Rounded.Download),
onClick = {
CustomTabsBrowser.launchUrl(context, R.string.url_beta)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import androidx.compose.material.icons.outlined.NewReleases
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.core.net.toUri
import com.dede.android_eggs.BuildConfig
import com.dede.android_eggs.R
import com.dede.android_eggs.util.AGPUtils
Expand All @@ -28,13 +27,7 @@ fun VersionOption() {
),
desc = AGPUtils.getVcsRevision(7),
onClick = {
val revision = AGPUtils.getVcsRevision()
val uri = if (revision == null) {
context.getString(R.string.url_github)
} else {
context.getString(R.string.url_github_commit, revision)
}
CustomTabsBrowser.launchUrl(context, uri.toUri())
CustomTabsBrowser.launchUrl(context, R.string.url_beta)
}
)
}
2 changes: 0 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
<string name="title_open_with">Open with</string>

<string name="url_github" translatable="false">https://github.com/hushenghao/AndroidEasterEggs</string>
<string name="url_github_commit" translatable="false">https://github.com/hushenghao/AndroidEasterEggs/commit/%s</string>
<string name="url_github_issues" translatable="false">https://github.com/hushenghao/AndroidEasterEggs/issues</string>
<string name="url_beta" translatable="false">https://www.pgyer.com/eggs</string>
<string name="url_privacy" translatable="false">https://github.com/hushenghao/AndroidEasterEggs/wiki/Privacy-policy</string>
<string name="url_license" translatable="false">https://www.apache.org/licenses/LICENSE-2.0.txt</string>
<string name="url_translation" translatable="false">https://crowdin.com/project/easter-eggs</string>
Expand Down
4 changes: 4 additions & 0 deletions app/src/market/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="url_beta" translatable="false">https://play.google.com/apps/testing/com.dede.android_eggs</string>
</resources>
15 changes: 7 additions & 8 deletions build-logic/convention/src/main/kotlin/Dls.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,16 @@ val Project.keyprops: Properties
val Project.catalog: VersionCatalog
get() = extensions.getByType<VersionCatalogsExtension>().named("libs")

fun NamedDomainObjectContainer<ApplicationBuildType>.createWith(
fun NamedDomainObjectContainer<ApplicationBuildType>.create(
name: String,
with: String? = null,
configureAction: Action<ApplicationBuildType>
) {
create(name) {
if (with != null) {
initWith(getByName(with))
}
configureAction.execute(this)
configureAction: Action<ApplicationBuildType>? = null
) = create(name) {
if (with != null) {
initWith(getByName(with))
}
matchingFallbacks += listOf("release", "debug")
configureAction?.execute(this)
}

val Project.javaExtension: JavaPluginExtension
Expand Down
Loading

0 comments on commit b859a0b

Please sign in to comment.