mirror of
https://github.com/MatsuriDayo/NekoBoxForAndroid.git
synced 2025-12-18 22:20:06 +08:00
some change
This commit is contained in:
parent
7da3bdd0ee
commit
e4d38ba44d
@ -18,6 +18,7 @@ import androidx.preference.PreferenceDataStore
|
|||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import com.google.android.material.navigation.NavigationView
|
import com.google.android.material.navigation.NavigationView
|
||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
|
import io.nekohasekai.sagernet.BuildConfig
|
||||||
import io.nekohasekai.sagernet.GroupType
|
import io.nekohasekai.sagernet.GroupType
|
||||||
import io.nekohasekai.sagernet.Key
|
import io.nekohasekai.sagernet.Key
|
||||||
import io.nekohasekai.sagernet.R
|
import io.nekohasekai.sagernet.R
|
||||||
@ -117,7 +118,8 @@ class MainActivity : ThemedActivity(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isPreview) {
|
if (isPreview) {
|
||||||
MaterialAlertDialogBuilder(this).setTitle(R.string.preview_version)
|
MaterialAlertDialogBuilder(this)
|
||||||
|
.setTitle(BuildConfig.PRE_VERSION_NAME)
|
||||||
.setMessage(R.string.preview_version_hint)
|
.setMessage(R.string.preview_version_hint)
|
||||||
.setPositiveButton(android.R.string.ok, null)
|
.setPositiveButton(android.R.string.ok, null)
|
||||||
.show()
|
.show()
|
||||||
|
|||||||
@ -486,10 +486,9 @@
|
|||||||
<string name="global_allow_insecure">总是跳过 TLS 证书验证</string>
|
<string name="global_allow_insecure">总是跳过 TLS 证书验证</string>
|
||||||
<string name="network_change_reset_connections">当网络发生变化时重置出站连接</string>
|
<string name="network_change_reset_connections">当网络发生变化时重置出站连接</string>
|
||||||
<string name="wake_reset_connections">当设备从睡眠状态唤醒时重置出站连接</string>
|
<string name="wake_reset_connections">当设备从睡眠状态唤醒时重置出站连接</string>
|
||||||
<string name="preview_version">预览版</string>
|
|
||||||
<string name="preview_version_hint">本应用为预览版,可能存在诸多问题。若您不愿参与测试,请前往GitHub下载正式发布版本!</string>
|
<string name="preview_version_hint">本应用为预览版,可能存在诸多问题。若您不愿参与测试,请前往GitHub下载正式发布版本!</string>
|
||||||
<string name="check_update_preview">检查预览版更新</string>
|
<string name="check_update_preview">检查预览版更新</string>
|
||||||
<string name="check_update_release">检查正式版</string>
|
<string name="check_update_release">检查正式版更新</string>
|
||||||
<string name="update_dialog_title">发现新版本</string>
|
<string name="update_dialog_title">发现新版本</string>
|
||||||
<string name="update_dialog_message">当前版本:%1$s\n可升级版本:%2$s\n是否前往下载?</string>
|
<string name="update_dialog_message">当前版本:%1$s\n可升级版本:%2$s\n是否前往下载?</string>
|
||||||
<string name="check_update_no">检查成功,但没有更新。</string>
|
<string name="check_update_no">检查成功,但没有更新。</string>
|
||||||
|
|||||||
@ -566,7 +566,6 @@
|
|||||||
<string name="padding">Padding</string>
|
<string name="padding">Padding</string>
|
||||||
<string name="network_change_reset_connections">Reset outbound connections when network changes</string>
|
<string name="network_change_reset_connections">Reset outbound connections when network changes</string>
|
||||||
<string name="wake_reset_connections">Reset outbound connections when device wake from sleep</string>
|
<string name="wake_reset_connections">Reset outbound connections when device wake from sleep</string>
|
||||||
<string name="preview_version">Preview version</string>
|
|
||||||
<string name="preview_version_hint">This application is a preview version and may contain many problems. If you do not want to test it, please go to GitHub to download the Release version!</string>
|
<string name="preview_version_hint">This application is a preview version and may contain many problems. If you do not want to test it, please go to GitHub to download the Release version!</string>
|
||||||
<string name="check_update_preview">Check for preview version updates</string>
|
<string name="check_update_preview">Check for preview version updates</string>
|
||||||
<string name="check_update_release">Check for release version updates</string>
|
<string name="check_update_release">Check for release version updates</string>
|
||||||
|
|||||||
@ -193,9 +193,17 @@ fun Project.setupApp() {
|
|||||||
applicationVariants.all {
|
applicationVariants.all {
|
||||||
outputs.all {
|
outputs.all {
|
||||||
this as BaseVariantOutputImpl
|
this as BaseVariantOutputImpl
|
||||||
outputFileName = outputFileName.replace(project.name, "NekoBox-$versionName")
|
val isPreview = outputFileName.contains("-preview")
|
||||||
.replace("-release", "")
|
outputFileName = if (isPreview) {
|
||||||
.replace("-oss", "")
|
outputFileName.replace(
|
||||||
|
project.name,
|
||||||
|
"NekoBox-" + requireMetadata().getProperty("PRE_VERSION_NAME")
|
||||||
|
).replace("-preview", "")
|
||||||
|
} else {
|
||||||
|
outputFileName.replace(project.name, "NekoBox-$versionName")
|
||||||
|
.replace("-release", "")
|
||||||
|
.replace("-oss", "")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user