Skip to content

Commit

Permalink
Merge pull request #198 from Block-Network/Dev
Browse files Browse the repository at this point in the history
## 5.3.0
改动比较多,这次的更新日志就不水了

适配 酷狗概念版
添加 显示编译时间 
添加 部分系统隐藏通知图标 (未测试)
修复 Activity重建闪退
修复 自定义hook无法恢复默认
修复 众多问题
优化 代码
  • Loading branch information
xiaowine authored Jun 3, 2022
2 parents c84a8b6 + 23c2f9c commit 94cb528
Show file tree
Hide file tree
Showing 30 changed files with 352 additions and 201 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/Android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
cd blockmiui
git submodule init
git submodule update
- name: Clone TOAST
run: |
cd xtoast
git submodule init
git submodule update
- name: Build with Gradle
run: |
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/Android_Dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
cd blockmiui
git submodule init
git submodule update
- name: Clone TOAST
run: |
cd xtoast
git submodule init
git submodule update
- name: Build with Gradle
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "blockmiui"]
path = blockmiui
url = https://github.com/577fkj/blockmiui.git
[submodule "xtoast"]
path = xtoast
url = https://github.com/xiaowine/xToast
54 changes: 30 additions & 24 deletions .idea/codeStyles/Project.xml

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

50 changes: 11 additions & 39 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,23 @@ plugins {

android {
compileSdk = 32

val buildTime=System.currentTimeMillis()
defaultConfig {
applicationId = "statusbar.lyric"
minSdk = 26
targetSdk = 32
versionCode = 157
versionName = "5.2.5"
versionCode = 160
versionName = "5.3.0"
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
buildConfigField("String", "BUILD_TIME", "\"$buildTime\"")
}

buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
setProguardFiles(
listOf(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
"proguard-log.pro"
)
)
setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro", "proguard-log.pro"))
}
}
compileOptions {
Expand All @@ -54,40 +49,17 @@ android {
}
applicationVariants.all {
outputs.all {
(this as BaseVariantOutputImpl).outputFileName =
"StatusBarLyric-$versionName($versionCode)-$name.apk"
(this as BaseVariantOutputImpl).outputFileName = "StatusBarLyric-$versionName($versionCode)-$name-$buildTime.apk"
}
}
}

fun getGitHeadRefsSuffix(project: Project): String {
// .git/HEAD描述当前目录所指向的分支信息,内容示例:"ref: refs/heads/master\n"
val headFile = File(project.rootProject.projectDir, ".git${File.separator}HEAD")
if (headFile.exists() && headFile.canRead()) {
val string: String = headFile.readText(Charsets.UTF_8)
if (string.contains("Dev")) {
val heads = File(
project.rootProject.projectDir,
".git${File.separator}refs${File.separator}heads${File.separator}Dev"
)
if (heads.exists() && heads.canRead())
println(heads.readText(Charsets.UTF_8).substring(0, 7))
return heads.readText(Charsets.UTF_8).substring(0, 7)
}
}
return ""
}

dependencies {
//API
compileOnly("de.robv.android.xposed:api:82")
//带源码Api
compileOnly("de.robv.android.xposed:api:82:sources")
// Use Hide Api
compileOnly(project(":hidden-api"))
//MIUI 通知栏
implementation(files("libs/miui_sdk.jar"))
// microsoft app center
dependencies { //API
compileOnly("de.robv.android.xposed:api:82") //带源码Api
compileOnly("de.robv.android.xposed:api:82:sources") // Use Hide Api
compileOnly(project(":hidden-api")) //MIUI 通知栏
implementation(files("libs/miui_sdk.jar")) // microsoft app center
val appCenterSdkVersion = "4.4.3"
implementation("com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}")
implementation("com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}")
Expand Down
Loading

0 comments on commit 94cb528

Please sign in to comment.